On Wed, 31 Jul 2002, Syed Najeebullah Hussaini wrote: > May i know whats the difference in between Movable and Non Movable Chunk > in a Dynamic heap. In what situations, can one use this Chunks
MemPtrNew() allocates a non-moveable chunk. It's stuck in one place in memory and can't be moved to make room for other allocations that may occur. Not really a good thing if you're allocating memory to hang onto for a while. MemHandlePtr() allocates a moveable chunk and returns a handle. When you need to access it, you lock it and unlock it. Locking it temporarily makes it non-moveable and returns a pointer that you can use the access the memory. Otherwise, the OS is free to move the chunk around as needed to satisfy other allocation requests. ----------------------------------------------------------------------- Brian Smith // avalon73 at arthurian dot nu // http://www.arthurian.nu/ Software Developer // Gamer // Webmaster // System Administrator "Senate, n.: A body of elderly gentlemen charged with high duties and misdemeanors." -- Ambrose Bierce -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
