Subject: Re: malloc queries
To: Stuart Brooks <Stuartb@cat.co.za>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: tech-userlevel
Date: 06/06/2002 18:07:27
No, by default application uses libc malloc(). Only applications which
explicitly link with -lgnumalloc use GNU malloc.

Jaromir

Stuart Brooks wrote:
> Hi there,
> 
> I have been trying to get to grips with the internals of malloc on Netbsd,
> and I have a few questions I am hoping someone might have the answer to...
> 
> Firstly, I am compiling with GCC. Does that mean that it will link in the
> gnu malloc library (/usr/src/gnu/lib/libmalloc/) or the stdlib malloc
> (/usr/src/lib/libc/stdlib/)?
> 
> Which of these 2 is preferred and are there any funnies? I have been looking
> mainly at the GNU implementation as it is dated 1989-93 as opposed to 1980
> something. There just appear to be a few minor problems; for one the
> "_chunks_used" variable appears to be incorrectly adjusted when the heap
> info table is grown in morecore (malloc.c).
> 
> Thanks in advance
> 
>  Stuart
> 
> 


-- 
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.NetBSD.org/Ports/i386/ps2.html
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-