Bill Allombert on Wed, 15 Jan 2003 19:19:07 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: garbage collection |
On Wed, Jan 15, 2003 at 11:00:57AM -0700, Richard Schroeppel wrote: > In Lisp systems, typical garbage collector behavior is to bump memory > by *2 or +20% when insufficient free space is returned (<20%). If > we've hit the upper limit and can't or won't get more, the user > deserves a message, and maybe an opportunity to increase the limits. > This is an area where "one behavior fits all needs" isn't right. If > I'm on a single user machine, I may be willing to live with the thing > grinding to a near halt in order to let my computation finish; or > maybe not. In this case, if your OS has a good VM engine like Linux, Solaris of FreeBSD, just start GP with a very large stack. Only the pages you modify are really allocated by the system, so you do not waste memory. At the end of a computation you can reclaim the pages allocated by recreating the stack with allocatemem. With this approach, we could easily implement a 'virtual' bottom of the stack that we could lower it when need be, until it is equal to the real bottom of the stack. We never implemented it because it is a bit of a kludge but sometime it is useful. Cheers, Bill.