It's in the Palm OS documentation. See "File Streaming Functions". You'll find FileOpen, FileRead, FileWrite, etc,
eg. FileHand FileOpen (UInt16 cardNo, const Char *nameP, UInt32 type, UInt32 creator, UInt32 openMode, Err *errP) Int32 FileWrite (FileHand stream, const void *dataP, Int32 objSize, Int32 numObj, Err *errP) "aparanjape" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can u send me an example of this? > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Ralph > Curtis > Sent: Monday, April 19, 2004 6:55 PM > To: Palm Developer Forum > Subject: Re: Allocating memory on a Palm > > > Do you really need the data in dynamic memory? Use the stream files API > (FileOpen etc) if you can. Quite simple to use. > > "aparanjape" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > Hi: > > > > I want to dynamically allot a memory of around 380 KB PDB file on the > > Palm device. My application needs to load the file at one time. Maybe > > the app will need to load more than one such file at a time. Palm OS > > has a constraint that the allocation unit cannot be more than 64KB > > i.e. malloc equivalent of Palm can allocate only upto 64KB of memory > > in one call. And total memory that can be dynamically allocated is > > around 200KB for a 4MB device. Please correct me if i am wrong. > > > > I am not able to load such a big file into memory due to this problem. > > > Is there any way to do this? When my app tries to load the file, it > > crashes. The device I am using has 16MB of RAM. > > > > Any help would be appreciated. > > > > > > > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, > please see http://www.palmos.com/dev/support/forums/ > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
