ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/May-Jun/Overloading-functions

This is Overloading-functions in view mode; [Up]


Date: Sun 11-Jun-1989 02:34:53 From: Unknown Subject: Overloading functions Recently, when trying to compile bash (a shell from the Free Software folks) on my Cube, I ran into a problem I have run into before. Bash makes its own versions of malloc(), free(), and realloc(). Ld does not appreciate them competing with the ones in libc. Is there any simple way to tell the compiler or loader to just overload redefined functions? Thanks for any hints.
Date: Sun 13-Jun-1989 19:14:16 From: Unknown Subject: Re: Overloading functions In article <9368@csli.Stanford.EDU> Daniel M. Rosenberg writes: >Bash makes its own versions of malloc(), free(), and realloc(). Ld >does not appreciate them competing with the ones in libc. Is there >any simple way to tell the compiler or loader to just overload >redefined functions? Using shared libraries, no, you have no way to overload functions. You can, however, use the non-shared versions of the libraries --- replace -lsys_s with -lc and any others you might need. Please note that the memory allocation routines in the NeXT libraries are highly optimized and do a good job. Unless there's some other reason to override them, it might not be a bad idea to just use the NeXT versions. (I'm not familiar with the bash code; it might turn out that the bash versions of malloc etc do other stuff...) Ali Ozer, NeXT Developer Support aozer@NeXT.com >From: mm55+@andrew.cmu.edu (Mary E. McCaffrey)
Date: Sun 19-Jun-1989 16:40:40 From: Unknown Subject: Re: Overloading functions In article <9996@polya.Stanford.EDU> aozer@NeXT.com (Ali Ozer) writes: >In article <9368@csli.Stanford.EDU> Daniel M. Rosenberg writes: >>Bash makes its own versions of malloc(), free(), and realloc(). Ld >>does not appreciate them competing with the ones in libc. Is there >>any simple way to tell the compiler or loader to just overload >>redefined functions? > >Please note that the memory allocation routines in the NeXT libraries are >highly optimized and do a good job. Unless there's some other reason to >override them, it might not be a bad idea to just use the NeXT versions. >(I'm not familiar with the bash code; it might turn out that the >bash versions of malloc etc do other stuff...) Yes, there is, in many cases of porting code to the NeXT, a need to overload these functions. I have gotten in the habit of just renaming the malloc redefinitions to something like Malloc. Carter Bullard School of Information & Computer Science, Georgia Tech, Atlanta GA 30332 >From: gillies@p.cs.uiuc.edu

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.