5 Apr 2004 17:52
Re: garbage collection
Rick Giuly <gte185y <at> prism.gatech.edu>
2004-04-05 15:52:44 GMT
2004-04-05 15:52:44 GMT
>
> On Apr 3, 2004, at 11:47 PM, Rick Giuly wrote:
>
> > There must be something wrong with the breve's ability to free memory.
> > The following code will run all the way up to 100megs of memory usage.
> >
> > for i=0, i<200000, i+=1: {
> > a = new Shape.
> > free a.
> > }
>
> When an object is freed in breve, it is not garbage collected at that
> very instant. It is marked for deletion, and then officially removed
> at the end of the timestep.
>
> In a language like C, you would expect code like that to never have
> more memory allocated than the size of "Shape". In breve, on the
> other hand, the memory will start low, climb to 200000 * (the size
> of shape), and then drop again after the next iteration step.
>
> So when I run this test, I do see the memory surge up very high --
> but then I also see it (eventually) go back down again. So while
> this is an inconvenience, I don't think it's actually a leak.
>
> - jon klein
>
I can see how that would work for most programs. I just have this data
processing part that uses lots of memory before it does a single iteration.
So the memory usage blows up before it has a chance to collect.
-rick
_______________________________________________
breve mailing list
breve <at> spiderland.org
http://www.spiderland.org/mailman/listinfo/breve
RSS Feed