At 1:02 PM +0100 12/3/99, Danko Radic wrote:
>Just one question when we came onto that: is that chunk allocated in The
>Heap - the same one where the variables, globals etc allocate their space
>and is very expensive to use?

Read the article Bob mentioned:

http://oasis.palm.com/devzone/knowledgebasearticle.cfm?article_id=1145

This paper describes the heaps in detail. To answer your specific question: MemPtrNew 
and MemHandleNew both allocate a chunk in the dynamic heap. DmNewHandle allocates a 
chunk in the storage heap, as does DmNewRecord. The storage heap is protected from 
accidental writes; you have to use DmWrite, etc to write to it. This is slower than 
direct writes to chunks in the dynamic heap. So whether you use MemPtrNew or 
MemHandleNew has no effect on the performance of subsequent writes to the chunk. The 
difference is how the dynamic heap gets fragmented, which affects the performance of 
subsequent allocations.
-
Danny Epstein, Applied Thought Corporation
Have friends with Palm organizers? Get BeamBooks!
http://www.appliedthought.com/beambooks

Reply via email to