On Sun, Feb 15, 2009 at 01:21:28AM -0500, Glenn Fowler wrote:
> ast provides its own malloc/free, and those calls are mapped
> to _ast_malloc/_ast_free in the ksh/ast code for opensolaris builds
> so that call to free() in the stack trace was not done directly by
> any ksh/ast code

I believe this is a bad idea.  On Solaris it'd be best to use the global
malloc()/free() from libc (or interposed via pre-loading).

Rationales:

 - you'll end up with two allocators, which means...
 - ...you need to be real sure that some allocation won't be free()ed by
   the wrong allocator, and...
 - you need to make sure no more than one allocator uses brk()/sbrk();
 - finally, you also prevent use of pre-loaded alternative allocators.

I strongly recommend that ksh93/AST on Solaris use the standard
allocator, OR, if you insist on having a private allocator, that it
provide an allocator with standard names, so that: a) it interposes upon
libc's, b) remains interposable.

Incidentally, private allocators have helped find RLTD bugs, so they've
been useful in that sense, but that's about it.  6778453 comes to mind.

Nico
-- 

Reply via email to