Page 1 of 1

PostPosted: Mon Nov 08, 2004 6:37 pm
by izzy
Is there any way I can I can harness more memory for malloct()? currently I can only get between 4 & 5 K even though TealMembrain tells me there is 190K free with the largest block being 171K.


PostPosted: Wed Nov 10, 2004 11:50 pm
by wolfgang

did you consider the fact that in PocketC, behind the scenes, each variable is actually a struct, i.e. takes up more space than you would expect? This holds true even for simple int's or char's. Multiply 5K of variables with (I believe) 5-6 bytes per variable, then you end up with close to 32KBytes of allocated memory; and to my knowledge this is somewhere close to the maximum chunk that standard PalmOS can allocate.


Composing music on the PocketPC! -

PostPosted: Mon Nov 15, 2004 5:44 pm
by izzy
Well thanks, I guess that's that

PostPosted: Tue Nov 16, 2004 1:47 pm
by dewey
The memory reported as being free is storage RAM, which is different from dynamic RAM. Dynamic RAM is the memory that can be allocated and used from a Palm program. Older devices (which I assume yours is if only 190K of storage RAM is free) has ridiculously small amounts of dynamic RAM, sometimes lower than 32K.