Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by Brian C. Hobbs
Sat, 07 Nov 1992 00:33
NXZoneMalloc is your friend... NXBitmapImageRep is not.
Author: Brian C. Hobbs
Date: Sat, 07 Nov 1992 00:33
Date: Sat, 07 Nov 1992 00:33
30 lines
1550 bytes
1550 bytes
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."
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads