Hi all

I want to receive a HTML file (text only, no image) from Linux to the Palm
via Bluetooth Serial Port Profile and do some parsing. What kind of variable
or memory handle should I declare in order to store that HTML file
temporally?

In the first place, I create a global variable "char buffer[10000]" to hold
the HTML file, however it is not stable and will cause memory leak and I
sent the files a few times. So I changed to use local variable to store that
HTML file. However the situation become more worst than before. It seems
that the palm will not free that memory after I run that function each time
and therefore no memory can be used after I call my function several times.
So I want to ask which kind of memory allocation is better? E.g.
1. char [10000]
2. MemPtrNew(10000)
3. MemHandleNew(10000)
4. File Streaming (write file to palm's ram directly)

I know there are some memory limitation on palm (64K heap?). So I want to
know what should I do. In addition I know I can use File Stream to store
HTML file in the PalmOS RAM. However is it a good choice?

P.S. 10000 bytes used in the example is just a rough size because a normal
HTML text page is not greater than 10000 bytes. So, if possible, I want to
create more space to hold a larger HTML file.

Thanks a lot
Joseph Chan



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to