guile-devel
[Top][All Lists]
Advanced

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

Re: Do we trust the man on the GC trigger?


From: Miroslav Silovic
Subject: Re: Do we trust the man on the GC trigger?
Date: 30 Aug 2001 15:19:22 +0200

Marius Vollmer <address@hidden> writes:

> > One could think of storing some additional data in the header of each
> > malloc'ed block - that's probably the reason for your WHAT argument.  
> > But:  why would scm_free then have to provide the size argument?  This
> > could be stored in such a header as well.
> 
> Good point!  I wasn't thinking of scm_malloc necessarily keeping a
> header around, and thought that the caller could in most cases easily
> pass a valid SIZE value.  But, when we only make use of WHAT and SIZE
> during debugging, we could just as well make scm_malloc allocate an
> extra header, with SIZE and WHAT in it.

Well, since you're already managing the heap at that point, it would
make sense to put a specific malloc implementation into Guile. Then
the malloc implementation itself will know how much is allocated, and
you can get that information.

Also, the user application will end up with malloc that's actually
decent (Doug Lea's malloc comes to mind).

-- 
How to eff the ineffable?



reply via email to

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