some not-so-random questions

Andreas Raab raab at isgnw.CS.Uni-Magdeburg.De
Tue Nov 3 13:00:40 UTC 1998


> Yeah, but doesn't Squeak cycle through all its free memory over and
> over as it runs?  So if you allocate 40 megs, and 10 megs of that is
> old, then all 30 megs of the "free" space will be cycled through
> periodically.  If you only have 32 megs of RAM on your machine, then
> that 30 megs of free won't fit and it should be paged out and in over
> and over and over again.  It's not just the least-common memory pages
> that will be paged out, because all the pages are being used.

Yeah - that's the problem. And the reason why there is such thing as
"-memory:" switch after all.

> But it's fixable!  Squeak just needs to garbage collect more often when
> there is a lot of free space, so that it doesn't need to get near the
> top of its memory allocation.  Then, the top of Squeak's memory can
> usufelly page out and stay out.

It's not just *that* easy. For one thing, you need to have a way of
finding out when the host's memory facilities run out of space (e.g., when
physical+swap space get below a certain threshold). BTW, there is already
such a mechanism in the Win32 VM. The other tricky thing is that you have
to make sure that a GC does not run out of space (e.g., when remapping
pointers). Finally, you have to know what parts of Squeak memory are no
longer used so that they can be physically free'd after a GC took place.

> It would be nice, and I think it would work, but I don't know enough
> about how the memory management works to actually implement it....

I've been thinking about this for a while and the biggest problem really
is to make sure GC does not run out of space. The remaining stuff is
relatively easy to do. But one may also keep in mind that unlimiting the
memory range can lead to *huge* GCs after all so it might be interesting
to add an intermediate space between old and young. In fact, I do like the
Permspace from VW pretty much - it's very likely for a lot of objects in
the base image never to be touched by GC and you can make your life a lot
easier when you move all objects to permspace at the right time.

  Andreas
-- 
Linear algebra is your friend - Trigonometry is your enemy.
+===== Andreas Raab ============= (raab at isg.cs.uni-magdeburg.de) =====+
I Department of Simulation and Graphics      Phone: +49 391 671 8065  I
I University of Magdeburg, Germany           Fax:   +49 391 671 1164  I
+=============< http://isgwww.cs.uni-magdeburg.de/~raab >=============+





More information about the Squeak-dev mailing list