Seems to be an issue specific for BigNum. I would expect in the line
  s += i
new BigNum objects are created (and in turn allocated) and in turn the gc 
will kick in from time to time and run the finalizers of the BigNum objects 
that are not rooted anymore.



Am Dienstag, 15. März 2016 17:20:37 UTC+1 schrieb Bill Hart:
>
> Just to clarify what I meant by "Julia can't be responsible for...." I was 
> talking about the fact that the garbage collector does a gc_collect every 
> 23mb on my machine. If memory is allocated on the C side without calling 
> jl_gc_counted_malloc to do so, Julia can't be expected to include these 
> allocations in its count as it tries to work out if 23mb have been 
> allocated yet (and hence a gc_collect should be initiated).
>
> So I just meant Julia can't be expected to know about the allocations 
> unless we inform it. We of course remain responsible for cleaning it up.
>

Reply via email to