Discuss PocketC for Palm OS (including Desktop Edition)

Postby izzy on Mon Nov 08, 2004 6:37 pm

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.

Posts: 20
Joined: Fri Jun 11, 2004 1:48 pm

Postby wolfgang on Wed Nov 10, 2004 11:50 pm


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! -
Composing music on the PocketPC! -
Posts: 281
Joined: Tue Dec 12, 2000 4:22 am
Location: USA

Postby izzy on Mon Nov 15, 2004 5:44 pm

Well thanks, I guess that's that
Posts: 20
Joined: Fri Jun 11, 2004 1:48 pm

Postby dewey on Tue Nov 16, 2004 1:47 pm

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.
Site Admin
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 1 guest