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

Stuart

-----Original Message-----
From: Jaromir Dolecek [mailto:jdolecek@netbsd.org]
Sent: Thursday, June 06, 2002 6:07 PM
To: Stuart Brooks
Cc: tech-userlevel@netbsd.org
Subject: Re: malloc queries


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