W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1996

Re: [Request] Memory functions

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Thu, 06 Jun 1996 10:54:19 -0400
Message-Id: <199606061454.KAA08537@www20.w3.org>
To: sacha@clip.dia.fi.upm.es (Sacha)
Cc: www-lib@w3.org
Sacha writes:

> I have a small problem. I am writing code which gets called from
> an interpreter which, due to the interpreter's garbage collection
> policies, requires me to use special memory allocation functions
> with the same interface as malloc, calloc, realloc, free etc.
> 
> Would it be possible in future versions of the library to let the
> application register its own memory allocation functions rather 
> than using malloc by default?

Done :-) This has actually been done already in the 4.1 release that we 
about to ship an alpha version of in a week's time. It has a dynamic memory 
module where all allocations and deallocations go through and it allows for 
registration of special "freer" functions that can be called to free memory 
if we run low. Finally you can register a panic handler if none of the freer 
functions frees enough memory to allow the allocation to go through.

Henrik

-- 
Henrik Frystyk Nielsen, <frystyk@w3.org>
World-Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA
Received on Thursday, 6 June 1996 10:54:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:26 GMT