need more space/ want to monitor time/space usage

Ned Konz ned at squeakland.org
Fri Mar 12 00:54:12 UTC 2004


On Thursday 11 March 2004 4:28 pm, Ralph Boland wrote:
> I run out of space using Squeak on a 256M  linux (slackware 9.0) system
> when Squeak reaches about 50M of image size.
>
> Is there a way to increase this amount of memory?

Yes.

First, make sure you're using the latest VM version (3.6g-2 or a version from 
the CVS). You can get a copy of mine from 
http://bike-nomad.com/squeak/linux-squeak-vm-3.6g-2.zip

Second, don't tell Squeak how much memory to use.

That is, remove any -memory flags from your command line.

Here is a summary of the appropriate flags from the man page:

      -memory size[mk]

requests that a fixed heap of size bytes be allocated for the Squeak image. If 
the suffix `k' is given then the argument is expressed in kilobytes. If the 
suffux `m' is given then the argument is expressed in megabytes. This option 
SHOULD NOT be used, unless there is a good reason to do so, since it places 
an arbitrary limit on Squeak's object memory size.

       -mmap size[mk]

requests that a variable heap of at most size bytes be allocated. (The 
suffixes are as described for the '-memory' option.) squeak will initially 
allocate a heap that is large enough to hold the image, with a small amount 
of headroom. If at any time Squeak requires more memory for its image then 
additional space will be allocated dynamically. Likewise, when memory is no 
longer needed it will deallocated and returned to the system. The size 
argument places an upper limit on how big the heap can grow in this fashion. 
squeak uses a dynamic heap by default with the maximum size set to 75% of the 
available virtual memory or 1 gigabyte, whichever is smaller.

> Assuming that I can increase the amount of memory available to Squeak to
> (say) 200M will I not then have a problem that when I am not actually using 
> a lot of memory Squeak will nevertheless decline to garbage collect until 
> something close to 200M is actually used?   

See above.

> Is there a way to monitor what class of objects is/are using the most
> memory?
>
> While I'm here,  is there a way to profile where the time is spent when
> I run
> an application?
> My applications can be time consuming.

Yes. See TimeProfileBrowser and MessageTally.

Also, you can profile running processes from the ProcessBrowser.

You can profile the UI task itself from the World Menu/debug/start/browse 
MessageTally

-- 
Ned Konz
http://bike-nomad.com/squeak/



More information about the Squeak-dev mailing list