Discuss PocketC for Palm OS (including Desktop Edition)

Postby mleidel on Mon Apr 30, 2001 1:18 pm

Is there a way to status available memory?
What functions are most affected when memory starts to get low?

<img src=icon_smile_question.gif border=0 align=middle>
Posts: 9
Joined: Wed Dec 27, 2000 1:47 pm
Location: USA

Postby awschwab on Mon Apr 30, 2001 2:08 pm

From Joe Stadolnik's Pocket Toolbox library document:

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Int HeapSize(pointer freebytes)

This function "defragments" the dynamic heap memory and returns the number of bytes of the largest contiguous block in the heap. Also, the total number of free bytes remaining in the heap is returned through the freebytes parameter.

This function is particularly useful when dealing with many screen buffers and with large multi-dimensional arrays (see Array()).
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

I don't know about other types of memory.

If you don't use the toolbox, you probably should. It's the first listed of the Palm resources for PocketC on the Orbworks site. Joe is also the moderator of this forum.
Posts: 270
Joined: Tue Feb 06, 2001 2:33 pm
Location: USA

Postby jstadolnik on Mon Apr 30, 2001 3:01 pm

Using large amounts of dynamic memory, saveg (especially on color devices), or having many scratch buffers (via the toolbox) all cut into the dynamic heap size. If it hits zero... game over dude.


Edited by - jstadolnik on 04/30/2001 10:04:05
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby mleidel on Mon Apr 30, 2001 4:05 pm

Thanks for the info. <img src=icon_smile_big.gif border=0 align=middle>
Posts: 9
Joined: Wed Dec 27, 2000 1:47 pm
Location: USA

Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 4 guests