[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Memory leaks - how to find them?

From: Bonzini
Subject: Re: [Help-smalltalk] Memory leaks - how to find them?
Date: Tue, 27 May 2003 21:07:27 +0200

> It would be very useful, I think. I did try writing
> code to do this in Smalltalk, but it was misguided - I
> got references from the MethodContext back to the
> object, and it became very messy.

Nope, you cannot do that.  And you cannot even do half primitive-half Smalltalk 
#allInstances because the fields that you're going to examine are the entire 
space -- which is extremely more dynamic than the object class field.  Contexts 
have to be special-cased in the primitive (see is_owner in the code that I 

> Well, I did have a good look at BWindow TopLevel and
> BrowserMain Windows, but emptying them does not help.

I was thinking about the latter actually.

> Yes, understood. I was trying to say that, on each
> startup / snapshot / quit iteration, I would expect
> the objects created by the previous iteration to get
> garbage collected, and the same number of new ones
> created, so it should balance out to zero. As I say, I
> only ran two iterations, so it might not have quite
> got there.

Yes, that's the correct behavior.  With the patch I ran thirty of them and the 
size stayed there.

> Oh, I forgot - I'm still on 2.1pre - my internet
> connection's been down for a while, so I've not yet
> upgraded.

I hope you'll be able to apply my patch (it is against 2.1.2).  There should 
not be
severe mismatches.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]