This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GC and continuations


Janis Dzerins <jonis@mt.lv> writes:

> On 17 Feb 2000, Ole Myren Rohne wrote:
> 
> >Janis Dzerins <jonis@mt.lv> writes:
> >
> >> When I stopped the process (ctrl-c) and run GC like this: (gc) then
> >> no memory was reclaimed (at least it was not abvious in the `top').
> >
> >Try (gc-stats). Garbage collection and malloc/free are not necessarily
> >correlated.
> 
> But the fact stays the same --- when guile accumulates for example 40M, it
> stays that big forever (I supose; that was my question).

try it with any C program: malloc n big blocks; see what top tells
you; then free them and see what top tells you again.  most probably
(there may be exceptions, though I'm not aware of any) you'll see the
same figure.

Guile grabs memory with malloc, and free doesn't usually returns the
memory to the OS.

[ note that changing the Guile allocator to use mmap or brk could be a 
  worthwhile project.  apart from the possibility to return the memory 
  to the OS (which I personally think is not very important), you'd
  also get much better control over alignment, etc. ]

> jonis

--mike

-- 
===  ALL USERS PLEASE NOTE  ========================

The garbage collector now works.  In addition a new, experimental garbage
collection algorithm has been installed.  With SI:%DSK-GC-QLX-BITS set to 17,
(NOT the default) the old garbage collection algorithm remains in force; when
virtual storage is filled, the machine cold boots itself.  With SI:%DSK-GC-
QLX-BITS set to 23, the new garbage collector is enabled.  Unlike most garbage
collectors, the new gc starts its mark phase from the mind of the user, rather
than from the obarray.  This allows the garbage collection of significantly
more Qs.  As the garbage collector runs, it may ask you something like "Do you
remember what SI:RDTBL-TRANS does?", and if you can't give a reasonable answer
in thirty seconds, the symbol becomes a candidate for GCing.  The variable
SI:%GC-QLX-LUSER-TM governs how long the GC waits before timing out the user.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]