One Quickie

Using libgmalloc in gdb (gdb->General)
libgmalloc puts guard pages at the end of malloc'd blocks of memory, letting you catch buffer overruns. (This will hugely inflate your program's working set, and may lead to swapping) To turn on libgmalloc in gdb, do this:
(gdb) set env DYLD_INSERT_LIBRARIES /usr/lib/libgmalloc.dylib

borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book