Large fields on OS3.3 and OS4.1

Postby petershaw on Wed Jan 07, 2004 6:59 am

Hi there,

first of all, I wish everybody a happy new year !

But I also do have a question:

Currently, I try to programm an applet with PocketC (newest Version)
to get data via the serial interface (0x8000).

I need to capture about 35kB of data into the Palm Memory. This is only a temporary buffer.
My great problem is, that it is not possible for me, to allocate a
35kB long field of chars with PocketC, although I read about a maximum of 196kB.

I know, that
"PocketC applications can allocate up to around 8k of dynamic memory slots before running out of steam."
but I do not allocate with MALLOCT(); , instead I create a global
field of chars:

#include blabla.h
char tempfield[32000];
main {



After compiling, the app won't start, instead it tells me, that there is not enough memory to start the app.

My questions:

1.) Is there a possibility to allocate a char field with this size (35kb or larger) ?
2.) If not, can I instead allocate for example 7 fields with 5kb each and put them them togehter in a linked list of pointers.
3.) Does the largest size for allocating memory for global variables depend on how much the memory is fragmentated ?

Thank you very much in advance...

Posts: 1
Joined: Tue Dec 30, 2003 9:43 am
Location: Germany

Return to PocketC for Palm OS KB

Who is online

Users browsing this forum: No registered users and 1 guest