Thanks Steve.  That is a very good idea.  To use the database to hold the
memory chunk.  However, one question I have is what about the MemHandle and
char * that is used to hold the record handler (from DmGetRecord) and the
char * (from MemHandleLock)??  Would these be just an address so they won't
overrun the heap?  Also,  I would need to call SysFormArrayPointerToStrings
(because I am passing the string to a List Object) so I will need a second
handle, would this cause overrun to the heap?

After these two question is solved, I think this is going to be my solution.
Thank you very much!!! 
Eric Sun
Developer - RAD systems
Q. Data Inc.
4/28/00 1:09 PM

        -----Original Message-----
        From:   Steve Jackson [SMTP:[EMAIL PROTECTED]]
        Sent:   Friday, April 28, 2000 11:54 AM
        To:     Palm Developer Forum
        Subject:        Re: MemHandle Question

        Hi Eric,

        Here goes:
        - MemHandleNew and MemHandleResize allocate memory in the dynamic
heap.
        - The size of the dynamic heap varies depending on the version of
Palm OS.
        - If I remember correctly, it is never as small as 4K. On Palm OS
2.0 it is
        about 12K. It is significantly larger on Palm OS 3.X.

        Notes and Recommendations:
        - The way memory is organized in Palm OS, only very small amounts of
working
        memory can be used at one time by a program. Working memory includes
the
        stack and the dynamic heap.
        - With a data size that "large" (9300 bytes), your data should go
into a
        Palm OS "database" in order to run on Palm OS 2.0 devices.
        - It is probably best to put this data in a Palm OS "database"
regardless of
        which platforms you plan to support with your app.
        - A database record is just a chunk of memory up to 64K in size. You
use
        database APIs to create, write to, manage, and free the "record".
You read
        from a database record directly using a pointer. But, you must use a
        database API to write to it because the memory is protected from
direct
        write.
        - This is documented. But, you'll need to read nearly all of the
memory and
        data manager to see the whole picture.

        Good luck!

        -----Steve Jackson

        "Eric" <[EMAIL PROTECTED]> wrote in message
news:9870@palm-dev-forum...
        >
        > Hello all,
        > I just need to know, if I call MemHandleNew or MemHandleResize,
where do
        > they create the memory chunk for me?  Would it be within the 4K
heap we
        are
        > allocated to use or would be out in memory?
        >
        > I need to know this because the application I am working on will
generate
        a
        > selectable report-like List Object.  Each entry in the report is 3
rows.
        > Therefore, if I have 100 entries, then it will really be 300 lines
and at
        > that point, each line I is 31 bytes, for a total of 9300 bytes.
That is
        > double the heap??
        >
        > If that is the case, are there any other way to provide a report
in which
        > they can select entries in the report and do some data massaging
        > afterwards??
        >
        > Thanks,
        > Eric Sun
        > Developer - RAD systems
        > Q. Data Inc.
        > 4/27/00 5:06 PM
        >
        >



        -- 
        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