Date: Wed, 6 May 1998 21:48:44 -0500 From: Dan Nelson <dnelson@emsphone.com> To: Doug White <dwhite@resnet.uoregon.edu>, "Jason C. Wells" <jcwells@u.washington.edu> Cc: FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: malloc.h vs. stdlib.h Message-ID: <19980506214844.A16251@emsphone.com> In-Reply-To: <Pine.BSF.3.96.980506165639.6723I-100000@gdi.uoregon.edu>; from "Doug White" on Wed May 6 16:56:48 GMT 1998 References: <Pine.BSF.3.96.980506141940.896A-100000@s8-37-26.student.washington.edu> <Pine.BSF.3.96.980506165639.6723I-100000@gdi.uoregon.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (May 06), Doug White said: > On Wed, 6 May 1998, Jason C. Wells wrote: > > > >Probably. That way we're sure it's using our enhanced malloc > > >instead of a local reimplementation. > > > > I got confused here. When you say "use our enhanced malloc" do you mean > > use stdlib.h? > > Yes. Actually, no. To clarify, simply including a header file does not normally (barring #define tricks) make the linker suddenly decide to link in a different function. <malloc.h> is included because other OSes used to put the prototype for malloc() in there. malloc() is now prototyped in <stdlib.h>. SYSV also defined mallopt() and mallinfo() in <malloc.h>, but those functions aren't used anymore. SCO 5.0.4 and DEC OSF/1 provide stubs for these functions for backwards compatibility, but they do nothing. -Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980506214844.A16251>