Page 1 of 1

PostPosted: Wed Jan 07, 2004 6:59 am
by petershaw
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."
(http://64.78.17.111/forum/topic.asp?TOPIC_ID=1835)
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...




---
Greets
Peter