home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: 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
-
- 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
-