"Eric" <[EMAIL PROTECTED]> wrote in message news:32577@palm-dev-forum...
>
>
>
> > The default stack size on PalmOS varies from device to device, but is in
the
> > 2K to 4K range. MemPtr and MemHandle allocations are from the heap, not
the
> > stack. The stack would be the sum of all your local variables in the
> > current path of execution. Having large structures or buffers would
> > generally be a problem.
> >
>
> my program is a keyboard hack, so in Memo, datebook will call it. does
memo and
> my hack are shareing the same stack? Can my hack has own stack?
>From the HackMaster API documentation:
----
Patches are free-floating code snippets, so they do not have global variable
data. They inherit the stack of the currently running procedure, so should
not use excessive amounts of stack space. The dynamic heap may be filled or
empty, depending on whether or not the running program is using it
extensively (only use this for temporary storage, since dynamic heap space
is extremely precious). Patches may access databases and resource files and
features in order to retrieve configuration data stored for them by the
control panel routines.
----
It may be possible for a hack to allocate a fresh stack, change SP to point
to it, then fix things upon leaving, but it is left as an exercise for the
reader.
--
Ben Combee
Veriprise Wireless <http://www.veriprise.com>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/