shrinking stacks

Stephen Weeks sweeks@wasabi.epr.com
Fri, 3 Dec 1999 15:33:55 -0800 (PST)


Any recommendations on when and how much to shrink the stack(s) while
doing a gc?  Right now, stacks are doubled in size just before they
run out of space.  They used to be halved if less than 1/4 was used at
an gc.  I could stick with the same strategy.  Or, instead of halving
them, I could be more aggressive, and shrink them to be just slightly
larger than the amount used.

The reason I bring this up is that the arguments may change a bit in
the presence of many threads.  I should also point out that the stacks
created by callcc (Thread.copyCurrent) are made with no extra space,
since these stacks will never be modified again.