From: "Stringer" <[EMAIL PROTECTED]>
> >From: "Chris Tutty" <[EMAIL PROTECTED]>
> >More importantly, since you can't write directly to that area of memory
> >do you have to use DmWrite for all property manipulation?
>
> A locked memory chunk does not have to be written to with DmWrite(),
> that's only for persistent 'database' memory (for files).
>
> Keep in mind you have 4 kinds of memory available to you on the
> Palm OS(r).
>         Stack   (very small, a few KB, varies by OS)
Agreed.

>         Heap   (very small, perhaps 4KB - 32KB, varies by OS)
Agreed. Although under OS3.3 and 3.5 it's getting bigger than 32K.

>         Lockable memory (very, very large, limited by device RAM)
I'm not sure what you're referring to here.

Quoting from p151 of the PalmOS Programmers Companion (and assuming it's
correct):
The remaining portion of RAM not dedicated to the dynamic heap is configured
as one or more storage heaps used to hold nonvolatile user data such as
appointments, to do lists, memos, address lists, and so on. An application
accesses a storage heap by calling the database manager or resource manager,
according to whether it needs to manipulate user data or resources.
(end quote)

Now I would *love* for you to be right because it would make a lot of coding
so much easier, but to the best of my knowledge MemHandleNew() allocates
from the dynamic area and everything else is the data storage area which,
according to the docs for MemPtrDataStorage(), is write-protected.

>         Palm OS 'database' (persistent, for files)
>
Or, to use Palm's nomenclature (word of the day) the 'data storage heap' (as
opposed to the 'dynamic heap').  Allocated, accessed and altered using the
Dm~ functions and only those functions.

So is this a documentation error or can we really write freely to all the
memory in the Palm?  I'm not holding my breath.  Mind you, I can understand
the confusion with this, I'm continually having to remind myself that I'm
working in a strangely constrained environment.  Does the FAQ have a simple
section on Palm memory?

Chris Tutty




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to