Article View: comp.sys.next.programmer
Article #1007Re: malloc_error
From: moose
Date: Mon, 31 Aug 1992 17:25
Date: Mon, 31 Aug 1992 17:25
30 lines
1515 bytes
1515 bytes
In article <SHIN.92Aug29190422@sgtp.sgtp.apple.juice.or.jp>
shin@sgtp.apple.juice.or.jp (Sugou Shinichirou) writes:
> Hello.
>
> I don't know the way how to use 'malloc_error' function. Please refer to
> the UNIX manual 'malloc_error' about the detailed information.
>
> Suppose I want to execute myMallocErr() instead of the default routine
> whenever memory allocation error happens.
>
> void myMallocErr(int code)
> {
> printf("error");
> abort();
> }
>
> (2) Link program with '-lMallocDebug'. For example: If you are using IB,
> define the following line within Makefile.preamble, and 'make debug'
> will generate the malloc-check-routine active code.
>
> OTHER_DEBUG_LIBS = -lMallocDebug
>
I believe that linking MallocDebug will override your call you malloc_error.
Try this without linking in MallocDebug
--
Michael Rutman | moose@svcdudes.com
Cubist | makes me a NeXT programmer
Software Ventures | maker of MicroPhone Pro
#include <std.disclaimer> | really offesive political statement
Technical Details
Message-ID:
<1992Aug31.172521.847@svcdudes.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!agate!iat.holonet.net!uupsi!psinntp!svc!newsReferences:
<SHIN.92Aug29190422@sgtp.sgtp.apple.juice.or.jp>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!agate!iat.holonet.net!uupsi!psinntp!svc!news From: moose@svcdudes.com Subject: Re: malloc_error Message-ID: <1992Aug31.172521.847@svcdudes.com> Sender: news@svcdudes.com Reply-To: moose@svcdudes.com Organization: Software Ventures, Inc. References: <SHIN.92Aug29190422@sgtp.sgtp.apple.juice.or.jp> Distribution: comp Date: Mon, 31 Aug 92 17:25:21 GMT Lines: 30