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: Malloc and libraries.


"Dale P. Smith" <dpsm@en.com> writes:

> Some libraries allow you to provide custom malloc/free routines. In general,
> should these be left to the defaults or should routines be written that use
> scm_must_malloc/scm_must_free ?

all that scm_must_malloc/free do in addition to malloc itself is size
bookkeeping and invoking the GC if deemed appropriate.

so: when doing allocations which correllate strongly with the Scheme heap
usage (smob data being the most obvious example), do use
scm_must_malloc if possible.  for other allocations -- probably better 
not.

-- 
"I'm sorry, the teleportation booth you have reached is not in service at
this time. Please hand-reassemble your molecules or call an operator to
help you...."

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