home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / next / programm / 5923 < prev    next >
Encoding:
Text File  |  1992-09-01  |  1.4 KB  |  44 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!sun-barr!ames!agate!iat.holonet.net!uupsi!psinntp!svc!news
  3. From: moose@svcdudes.com
  4. Subject: Re: malloc_error
  5. Message-ID: <1992Aug31.172521.847@svcdudes.com>
  6. Sender: news@svcdudes.com
  7. Reply-To: moose@svcdudes.com
  8. Organization: Software Ventures, Inc.
  9. References: <SHIN.92Aug29190422@sgtp.sgtp.apple.juice.or.jp>
  10. Distribution: comp
  11. Date: Mon, 31 Aug 92 17:25:21 GMT
  12. Lines: 30
  13.  
  14. In article <SHIN.92Aug29190422@sgtp.sgtp.apple.juice.or.jp>  
  15. shin@sgtp.apple.juice.or.jp (Sugou Shinichirou) writes:
  16. > Hello.
  17. > I don't know the way how to use 'malloc_error' function. Please refer to
  18. > the UNIX manual 'malloc_error' about the detailed information.
  19. > Suppose I want to execute myMallocErr() instead of the default routine
  20. > whenever memory allocation error happens.
  21. > void myMallocErr(int code)
  22. > {
  23. >         printf("error");
  24. >         abort();
  25. > }
  26. > (2) Link program with  '-lMallocDebug'. For example: If you are using IB,
  27. >     define the following line within Makefile.preamble, and 'make debug'
  28. >     will generate the malloc-check-routine active code.
  29. >     OTHER_DEBUG_LIBS = -lMallocDebug
  30.  
  31. I believe that linking MallocDebug will override your call you malloc_error.   
  32. Try this without linking in MallocDebug
  33. --
  34. Michael Rutman            |    moose@svcdudes.com
  35. Cubist                |    makes me a NeXT programmer
  36. Software Ventures        |    maker of MicroPhone Pro
  37. #include <std.disclaimer>    |    really offesive political statement
  38.