Subject: RE: malloc queries
To: Jaromir Dolecek <>
From: Stuart Brooks <>
List: tech-userlevel
Date: 06/07/2002 07:23:16
Thanks, is there any particular advantage to using one or the other?


-----Original Message-----
From: Jaromir Dolecek []
Sent: Thursday, June 06, 2002 6:07 PM
To: Stuart Brooks
Subject: Re: malloc queries

No, by default application uses libc malloc(). Only applications which
explicitly link with -lgnumalloc use GNU malloc.


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
> 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 <>
-=- 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.''     -=-