Out of space + other flakiness

Bob Arning arning at charm.net
Sat Jun 30 21:23:03 UTC 2001


Ross,

On Sat, 30 Jun 2001 13:48:54 -0700 Ross Boylan <RossBoylan at stanfordalumni.org> wrote:
>> >A handy thing I found was "Smalltalk pointersTo:" to trace object
>> >references back.
>>
>>Also quite useful is
>>
>>         PointerFinder on: <someObject>
>>
>>This will trace <someObject> back to Smalltalk and open a window showing 
>>the links in the chain.
>
>Beautiful!  Sounds like just what I need.  Can it cope with multiple paths 
>and loops?

Loops - sure.
Multiple paths - not really. It reports the first path it finds that leads back to Smalltalk. If you are trying to clear out dead wood, eliminate that reference and then retry to see if there are any more. Remember to close inspectors, etc that may be holding references.

>> >Among the oddities encountered:
>> >I frequently ended up with two squeak processes running when it hung.
>> >I was a bit surprised to find it launching separate processes.
>>
>>Which OS is this?
>
>Debian GNU/Linux, kernel 2.4.2.  Mostly "woody" level packages.

I don't know Linux, but I have a vague recollection about two processes. Someone on the list surely knows.

>
>> >TheWorldMenu was pointing to one of the projects I hand't used much.
>>
>>Hmm.. doesn't sound like a good thing. I'll take a look at it.
>
>I thought this might be the result of some interrupted processing because 
>of the memory problems, rather than a bug in code.  E.g., I exited that 
>project but ran out of memory before the project in TheWorldMenu was 
>updated.  Although I guess I'd expect the project to be reset every time I 
>switched projects...

An instance of TheWorldMenu may have a reference to the project it belongs to, but this would not be a problem under normal circumstances, since the project points to the world which points to the menu and it's all in the family. Something else is probably keeping the whole mess around if you have really killed the project.

>
>Just did it.  I now see
>Smalltalk bytesLeftString '4,284,616 bytes (internal)
>193,700,040 bytes (physical)
>523,161,800 bytes (total)     '
>Before I got '5,245,932 bytes available'
>However, I'm now on Win32 and the "before" is Debian.  I can't tell if this 
>is progress.  

The Windows VM can tap into the OS and grab more memory for the Smalltalk heap, so it considers all of OS memory available. The other VM's use a preallocated size, so free space can mean very different things.

>Based on the total space use from printSpaceAnalysis, I 
>gained almost 2Mg..

Well, that sounds good.


>>         (String allInstances collect: [ :x | x size]) asBag
>>
>>         (String allInstances select: [ :x | x size > 1000])
>
>
>Most of the biggest strings apppear to be C source code.

Those are parts of the VM that are carried in the image as C source. If you are interested in saving more space *and* you don't plan on generating a new VM using this image, you could delete those methods.

Cheers,
Bob





More information about the Squeak-dev mailing list