Thank you Steve. Actually your guess is exactly what I'm doing now.
I'm trying to preserve the system state and then system recovery is
possible through the saved snapshot. I'm doing this because I would
like to provide an utility that saves system state across resets.
>From my observation, some apps save their execution states in a
record upon exits, so they don't suffer from state loss when the device
got reset; but some keep their execution states in the dynamic heap,
thus system resets cause state loss. (Please correct me if I'm wrong.)
Anyway, I'm not planing to do anything hacking the system.
I just want to develop an utility that makes Palm fault-tolerant! :-)
Could someone provide me with details that achieve the goal?
Thank you very much.
-- Chiyi Lin
"Steve Sabram" wrote:
>
> Chi-Yi Lin wrote:
>
> > For the reason why I would like to know how system globals
> > are allocated, I'm trying to implement an utility that takes snapshots
> > of the dynamic heap and then the dynamic heap could be recovered
> > later using the snapshot. In my experiment, the recovery process
> > restores all the memory content except the stack region of the recovery
> > process itself.
>
> What is the intent of this program?
>
> My guess is that you are trying to circumvent the OS to preserve state
> of the machine and bring it back up to that status at a later time.
> Unfortunately the Kadek kernel is doing a lot underneath the OS such
> as memory and thread management.
>
> Thus, to "snapshot" the binary image and preserve the state, you usually
> need to understand all system operations from the CPU reset vectors on up.
> Palm only documents the PalmOS API and not its internals publicly.
> My guess is that the kernel is not in the same state when you took the
> snapshot and are now trying to replace it, thus some sort of memory table
> of semaphore group is not identical.
>
> If you are willing to state the intention of you application, I'm sure
someone
> here can suggest a more orthodox and stable solution other than raw,
binary,
> memory block access a la microcontroller code.
>
> Steve
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/