If you look into MemoryMgr.c (available as part of the limited Palm OS sources) then you'll see that MemChunkNew() starts with the call MemSemaphoreReserve(true) and ends with MemSemaphoreRelease(true).
These functions should provide kind of mutex guarding access to the memory manager structures. I cannot imagine that the returned pointer would need such a guard. (You may check also the implementation of MemHandleNew() in the same Palm OS sources to confirm these words.) In other words, no semaphore management calls around the pointer returned from MemChunkNew are needed. Jan Slodicka ----- Original Message ----- From: "Fruber Malcome" <[EMAIL PROTECTED]> Newsgroups: palm-dev-forum To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Friday, February 13, 2004 8:03 PM Subject: Re: Sony Memory API problems > hmm.. I didn't think too much about using this, but it may work. > > How much do you use this function? - this leads into my next question. > > I typically access this data via direct arrays - which I could build > wrappers around and access with offsets so that DmWrite would work. > > But my question is, when using MemChunkNew, in order to access the data, I > need to call: > MemSemaphoreReserve(true); > > I wonder if I could use the combination of Ftr and the above so that it > would all work. > > I'll give it a shot.. > > Let me know if you have any additional insight. > > thanks! > bill > > > "Henk Jonas" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > What about FtrMem? > > > > Henk > > > > Fruber Malcome wrote: > > > Maybe the question should be rephrased: > > > Is MemChunkNew the only way to allocate memory (that could be larger > than > > > 64K) by a given heap? > > > > > > > -- > > ------------------------------------------------------------------------- > > Henk Jonas > > Palm OS � certified developer > > > > [EMAIL PROTECTED] www.metaviewsoft.de/palmos > > ------------------------------------------------------------------------- > > > > > > > > -- > 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/
