home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!think.com!rpi!psinntp!psinntp!cgrafx!brian
- From: brian@chromagrafx.com (Brian C. Hobbs)
- Subject: NXZoneMalloc is your friend... NXBitmapImageRep is not.
- Message-ID: <1992Nov7.003348.343@chromagrafx.com>
- Sender: brian@chromagrafx.com
- Organization: Chromagrafx Imaging Systems, Hauppauge, NY
- Date: Sat, 7 Nov 1992 00:33:48 GMT
- Lines: 30
-
-
- Greetings,
-
- Just a curious question: Are developers experiencing more memory
- corruption errors of bugs (i.e. invalid memory access, writing over
- existing data, etc...) using 3.0 than 2.1? It seems that I've got to
- explicitly NXZoneMalloc off everything I do just so the memory is there
- and protected.
-
- Also... this is more of an "intuition" thing... I've talked to NeXT about
- it but I don't know if it's valid and I can't give any examples here:
- I've had some corruption problems using [[NXBitmapImageRep alloc]
- initData:NULL ...] different times on multiple machines on multiple apps
- that I'm writing. However, if I malloc the memory myself and pass the
- pointer to initData, the problem goes away. (nifty methods, +sizeImage:
- and such.)
-
- The moral of this story:
-
- Don't be lazy. NXZoneMalloc off everything you can. Especially on large
- sections of memory like images. Stay away from:
-
- unsigned char imageData[justHowMuchCanIPutInHereAnyways:)]
-
- Brian Hobbs
- Chromagrafx Imaging Systems
- brian@chromagrafx.com
-
- "NXZoneMalloc and NXBitmapImageRep. Use them together. Use them in
- peace."
-