So, an errant program (read "virus") might allocate and not
free all the storage on the device requiring the user to
hard-reset, potentially loosing data?  I'd suggest a patch
REALLY fast!

-- Paul

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> m]On Behalf Of Neil
> Rhodes
> Sent: Monday, April 10, 2000 2:11 PM
> To: Palm Developer Forum
> Subject: BUG: orphan chunks not freed on reset in OS 3.5
>
>
> 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
>
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to