guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alloca and GC


From: Martin Grabmueller
Subject: Re: alloca and GC
Date: Tue, 30 Jan 2001 08:26:25 +0100

> From: Keisuke Nishida <address@hidden>
> Date: Tue, 30 Jan 2001 00:49:05 -0500
> 
> At 29 Jan 2001 15:10:08 -0500,
> Colin Walters wrote:
> > 
> > Well, Guile could take the Emacs approach and simply include a copy of
> > alloca in its sources.
> 
> Does it allocate memory in the C stack as well?  It might be great
> if I could use it because the VM would be simplified a bit with it.

Don't know about the alloca distributed with GNU Emacs, but the
portable alloca implementation distributed with most GNU packages is
malloc-based, and uses the heap for storage allocation.  

> On the other hand, if Guile is marking all objects referred from
> the C stack, allocating a huge VM stack on the C stack might slow
> down GC, while with my current approach, only necessary objects are
> actually marked.  I'm not sure how much this might affect.

I'm not sure what you mean here, but I think you're currently
allocating a large stack, and only traverse it for marking as far as
it is in use.  A stack on the C stack would be scanned completely.
This could be a performance penalty if the stack is large

Regards,
  'martin
-- 
Martin Grabmueller              address@hidden
http://www.pintus.de/mgrabmue/  address@hidden on EFnet



reply via email to

[Prev in Thread] Current Thread [Next in Thread]