Subject: Re: Memory consumption in NetBSD 1.5 (ELF) ?
To: Hauke Fath <hf@Tangro.DE>
From: Simon Burge <simonb@wasabisystems.com>
List: port-i386
Date: 10/09/2000 20:16:59
Hauke Fath wrote:
> At 21:37 06.10.00 +0100, David Brownlee wrote:
> > Someone mentioned the malloc library had changed - you could try
> > linking it with gnumalloc on both old and new to see if the
> > behaviour changes.
>
> How would I do that? I.e., how can I make sure that a -lgnumalloc (or
> whatever it's called - I assume that it ships with NetBSD) replaces
> whatever malloc is used by libc?
Any libraries listed on the command line will be used before (the
implied) -lc. So simply adding -lgnumalloc should do the trick. If
you add a "-v" to the link command, you'll see all the libraries and
their order. For example (with a lot of stuff trimmed out):
thoreau:/tmp 5> cc -v -o foo foo.c -lgnumalloc
Using builtin specs.
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
[...]
/usr/libexec/collect2 [...] -lgnumalloc -lgcc -lc -lgcc [...]
Simon.
--
Simon Burge <simonb@wasabisystems.com>
NetBSD Sales, Support and Service: http://www.wasabisystems.com/