> I am trying to lock/unlock a memory chunk.
> But after some no of iterations, it gives error "MemoryMgr.c, Line:3061,
> Chunk over-locked".
> Can anybody tell me where I have done mistake.
> I have used MemHandleLock and MemHandleUnlock in pairs only.... i.e first
> called MemHandleLock  and then MemHandleUnlock.
> There is no change in order.
> But when that piece of code is called around 8 to 9 times, it gives the
> above error.
> 
> Is there any limitation on Locking/Unlocking a memory chunk?

you can only lock an item 16 times. at the 17th = crash.
lock/unlock increment and decrement the lock count. thats the
important thing.. so:

  MemHandleLock(memHandle);
  MemHandleLock(memHandle);
  MemHandleUnLock(memHandle);

will be fine until you call it 9 times :)

---
Aaron Ardiri
PalmOS Certified Developer
[EMAIL PROTECTED]
http://www.mobilewizardry.com/members/aaron_ardiri.php


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to