<[EMAIL PROTECTED]> wrote in message news:71415@palm-dev-forum... > > A long time ago, Bernd Abel wrote: > > > > I'm using a simple C library which traces all allocations (i.e. > > MemHandleNew, MemPtrNew, new operator) and deallocations (MemHandleFree, > > MemPtrFree, delete operator) at runtime and writes the corresponding > > informations (chunk addresses, sizes, files, line numbers etc.) as XML > > tags to the host. > > Is there a reason why you force the code to use macros instead of setting > trap addresses?
Two good reasons: 1) settings traps won't work on future ARM-based Palm OS devices 2) Only by using a macro can you store information about the source file and line number where the allocation was originally made. I've not looked at Bernd's library, but I'm fairly sure he's using __FILE__ and __LINE__ to pass in information that helps track the allocation. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
