Hello Salvador,

You can create the memory dynamically in a few ways:
1. MemPtrNew() if you're sure you need less than 64KB
2. MemGluePtrNew() if you need 64KB or more
3. FtrPtrNew() allows you to go past the 64KB limit and also will stay
in memory until the next reset

If this data never changes though, your best bet would probably be to
store it within a database and use the DataMgr library to access your
data. You can easily do a one time PDB creation with various tools to
achieve this. One such tool is par, as you've noted, but I've found
pdbc to be very handy and easy to use.

Adrien.

Tuesday, May 24, 2005, 10:02:14 AM, you wrote:

SB> Hello,

SB> I got a big char[] in my program. And when I mean big it's REALLY BIG.
SB> About 64K. Luckily, its information and size will always be the same
SB> (I have this char[] declare in many code pages). I just need to read
SB> from it.

SB> My question is where to allocate this char[]
SB> (remember the fact that no modification is required)

SB> a) Do you advice me to save it as part of my code and create it on
SB> runtime? Disadvantage: 1) The code size increases too much and I need
SB> to put it alone in one segment. 2) I'm "creating" the char every time
SB> I run my program.

SB> b) save it as global data. DISMISSED. The 64K limit data per program
SB> speaks for itself.

SB> c) save it as a File with the FileStreaming Api and read from it
SB> c1) Do you know any program that I could use to write the file, send
SB> it to the Palm device and read from it with this Api? (Something like
SB> par maybe?). If I write the file from my code remember this will make
SB> my code increase. But maybe I could have a class that just writes this
SB> in a separate segment.

SB> d) save it as a database with par? I'm not sure the char[] is smaller
SB> than 64K, maybe its 62K. In this case, would you advice me to do this?

SB> e) any other option?

SB> Regards,
SB> Salvador



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

Reply via email to