Summary: In OS 3.5, after a reset, feature memory and chunks allocated with
DmNewHandle are *not* freed. In previous versions of the OS, these were
freed.
Reproduce with:
Palm OS Emulator 3.0a4 (Mac)
Palm Vx
8 Megabyte
ROM file: palmos35-dr4-en-ezdbg.rom
Write an application that makes the following calls:
AllocateFeatureMemory(UInt32 amountToAllocate)
{
UInt32 creator = '????';
UInt16 featureNumber = 5;
MemPtr mem;
Err err;
err = FtrPtrNew(creator, featureNumber, amountToAllocate, &mem);
if (err == 0)
return mem;
else
return NULL;
}
DmNewHandle(NULL, 10000);
AllocateFeatureMemory(50000);
Download the application, and then use the application launcher to check the
free memory. At this point, I show "Free Memory: 7910K of 7936K".
Run the application, and then go to the application launcher and use the
info menu item to see the amount of space in the storage heap. At this
point, I show "Free Memory: 7852K of 7936K".
Now, do a reset and check the info menu item again. I show:
Free Memory: 7851K of 7936K" (I don't know where the extra 1K comes from).
On 3.1 and 3.3 OS devices, the allocated memory is correctly freed after a
reset.
Workaround:
None known.
Neil
--
Neil Rhodes
Calliope Enterprises, Inc.
1328 Clock Avenue
Redlands, CA 92374
(909) 793-5995 [EMAIL PROTECTED] fax: (909) 793-2545
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html