This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Malloc and libraries.
- To: "Dale P. Smith" <dpsm at en dot com>
- Subject: Re: Malloc and libraries.
- From: Michael Livshin <mlivshin at bigfoot dot com>
- Date: 27 May 2000 00:50:52 +0300
- Cc: "guile at sourceware dot cygnus dot com" <guile at sourceware dot cygnus dot com>
- Organization: who? me?
- References: <00May26.174027edt.17030@gateway.elms.k12.oh.us>
"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...."