Though I have full faith in Scott's scheme, I'd like to suggest a different mechanism. Why not implement a wrapper function around memHandleLock, in such a way that every time to lock the reference count is incremented and every time you unlock its decremented. Might actually help you trap the over locking situation, rather than trying to patch it up !!
Luck, Waseem. -----Original Message----- From: Chris Tutty [mailto:[EMAIL PROTECTED]] Sent: Friday, May 03, 2002 2:57 AM To: Palm Developer Forum Subject: Re: MemoryMgr Fatal Alert on M515 From: "Scott Johnson" <[EMAIL PROTECTED]> > Here's one debug technique we've used for reproducing "lock leaks" much more > efficiently: deliberate over-locking. Instead of locking suspect memory > objects just once (with a single MemHandleLock call and corresponding > MemHandleUnlock), lock with multiple MemHandleLock's (say 14) and unlock > correspondingly. Then instead of needing 15 passes through the offending > code path, it should take only one or two. Or if it's valid for certain > types of objects to have nested locks, just reduce that overlock constant as > needed. > Now *that's* a good idea. Whoever's responsible for the 'debugging' section of the PalmOS Companion should be taking notes about now. Chris Tutty -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
