Re: garbage collection

"Rick Giuly" <[email protected]>
Newsgroups gmane.comp.breve
Message-ID <001401c41b26$09421750$0401a8c0@horse>


>
> 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
[email protected]
http://www.spiderland.org/mailman/listinfo/breve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.