At 09:43 AM 3/7/2005, you wrote:
I'm using CW8.3 and need to keep better track of whether or not I'm over- or underwriting memory and possibly stomping on stuff I don't own.
If you test under the Palm OS Emulator, it does this testing for you automatically.
Thanks Keith. That saves me a lot of time. One thing I need clarification on, though, is the difference between these two types of declarations and how they're handled in memory:
UInt16 A[5]; A[6] = 0.0;
UInt16* B = new UInt16[5]; B[6] = 0.0;
The memory boundary violation for the "A" code is not caught by POSE, but the "B" code is caught.
The UInt16 A[5] is either a stack or global variable, depending on the context. POSE's memory tracking features only handle dynamic memory allocations -- the static allocations aren't done at runtime and there's no way for POSE to modify those allocations to include a guard region that's used to detect writing outside the allocated area.
-- Ben Combee, Senior Software Engineer, palmOne, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Forum Archives: http://news.palmos.com/read/all_forums/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
