Ben,

aha! Thanks for the clarification. I'll go grab another cup of coffee and re-read the Memory Manager docs!

Thanks,

Ted


On Jul 14, 2004, at 9:50 AM, Ben Combee wrote:

At 11:50 AM 7/14/2004, you wrote:
I feel like I must be missing something simple...

Is there a way to get the correct data size of a resource? The only possibilities that I have found are MemHandleSize()/MemPtrSize(), but their documentation says "Call this routine to get the original requested size of a chunk." which sounds like it will be some rounded up size, not the actual number of bytes of data stored.

MemHandleSize is appropriate; it will return the correct length of the resource. The docs are telling you that if you all MemPtrNew(100) and you actually get a 128 byte chunk of memory allocated to you, MemPtrSize will still tell you that the chunk is 100 bytes long.



-- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/




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

Reply via email to