home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14514 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  1.8 KB

  1. Path: sparky!uunet!stanford.edu!rutgers!concert!samba!usenet
  2. From: Bathsheba.Grossman@bbs.oit.unc.edu (Bathsheba Grossman)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: coping with memory bugs
  5. Message-ID: <1992Aug26.002840.25287@samba.oit.unc.edu>
  6. Date: 26 Aug 92 00:28:40 GMT
  7. Sender: usenet@samba.oit.unc.edu
  8. Organization: UNC Office of Information Technology
  9. Lines: 32
  10. Nntp-Posting-Host: lambada.oit.unc.edu
  11.  
  12. Here's a list of tips I've received on coping with Those Annoying Memory
  13. Bugs:
  14.  
  15. Read Knaster's "How to Write Macintosh Software" and somebody else's
  16. "Programming With Macsbug".    (ok, when I get some cash)
  17.  
  18. Get the debugging extensions from ftp.apple.com that catch dumb stuff like
  19. dereferencing NULL and releasing resources twice.   (check)
  20.  
  21. Use Macsbug heap-checking and scrambling functions, hc and hs  (did that
  22. already) and Step Spy.
  23.  
  24. Use Debugger() and DebugStr(<string>) to drop into the debugger.  (neat!
  25. where are these documented?  I though I knew IM pretty well.)
  26.  
  27. For coping with low memory conditions, use a growZoneProc (IM II,
  28. SetGrowZone()) which frees some emergency reserve memory (and any other
  29. available) and shows a dialog saying help, I'm running out.
  30. (This is nice, but what tends to happen is that the dialog comes up, the
  31. slushpile gets eaten, and death ensues immediately, before my code gets
  32. control back.  Makes ya miss UNIX sometimes; what I really want to do is
  33. jump out and start over.)
  34.  
  35. Thanks to all who mailed.  (What, no magic solution?  You mean I have to
  36. think about this?  Oh, I hate that.)
  37.  
  38. -Sheba
  39. --
  40.    The opinions expressed are not necessarily those of the University of
  41.      North Carolina at Chapel Hill, the Campus Office for Information
  42.         Technology, or the Experimental Bulletin Board Service.
  43.            internet:  bbs.oit.unc.edu or 152.2.22.80
  44.