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