David Janssens writes:
>Hi, anyone knows if's possible to malloc more than 64KB of contiguous memory
>with PalmOS5? (this memory must have fast write access, not using DmWrite)
>I'm trying to port an mpeg decoder and I need this to handle frames that are
>bigger than 320x200.
>BTW: the tungsten display is 320x320, so how is it possible to malloc bits
>for a high-res bitmap covering the whole screen?
Just allocate an offscreen bitmap with w*h*d big enough:
BitmapType *bmPtr;
void *memPtr;
bmPtr = BmpCreate (w, h, d, colortablePtr, &err);
if (memPtr) {
memPtr = BmpGetBits(bmPtr);
...
BmpDelete(bmPtr);
Works for malloc'ing well over 64 kB, and uses only documented and
supported OS calls.
And there's nothing to keep you from using a bitmap for data that's would
look really ugly if ever displayed. :^)
IMHO. YMMV.
Ron Nicholson
HotPaw Productions
<http://www.hotpaw.com/rhn/hotpaw>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/