I did a test on deallocations, and the behavior is not what I expected.

The code I ran is:

@everywhere using Ops

function test_allocation()
  a = drand(10000, 10000)
  b = 2a
  readline()
end

test_allocation()
@everywhere gc()
readline()

Ops module defined the '*' operator (where a new DArray is created). I can 
see that master's memory went down after the gc() call, but the workers' 
memory remained unchanged.

<https://lh5.googleusercontent.com/-qo7SKwkoya0/VFmZrIWL0EI/AAAAAAAABkk/FctwkEcQWnk/s1600/mem.png>
So the question is: "how to really free a DArray? Both master and workers!"


On Thursday, October 16, 2014 10:18:42 PM UTC+8, Amit Murthy wrote:
>
> meant to say  "all references  from all processes are removed"
>
> On Thu, Oct 16, 2014 at 7:47 PM, Amit Murthy <[email protected] 
> <javascript:>> wrote:
>
>> Yes, it is gc'ed just like any other object, when all references to it 
>> from any process is removed. 
>>
>> On Thu, Oct 16, 2014 at 2:59 PM, Seth Yuan <[email protected] 
>> <javascript:>> wrote:
>>
>>> Now, I know by reading the documentation how a DArray is created, but 
>>> I'm not sure when a DArray is deallocated.
>>>
>>> Is it GC able when the master looses all references of it? Does somebody 
>>> know the answer to this question?
>>>
>>
>>
>

Reply via email to