On Tue, 8 Jun 2004 17:16:10 -0300, "R�gis Daniel de Oliveira"
<[EMAIL PROTECTED]> wrote:

>Hy all!
>
>
>My app need to allocate four 4k buffer, that will be used by many functions
>during the app execution. I can allocate memory for the pointers using
>MemPtrNew and MemHandleNew.
>
>Witch one is the best for using?

If the buffers are going to be in use nearly all the time, you might
as well use MemPtrNew which locks the memory and makes it available
for normal use at once.  Use MemHandleNew only if the memory needs to
be accessed only occasionally.  You will have to lock it before each
access and unlock it after.  The benefit is that this memory can be
moved by the operating system to make larger blocks available.  If
your application is not short on memory, then this benefit may be of
little use, and not worth the bother of all the locks and unlocks.


Robert Scott, Ypsilanti, MI
(reply through this forum, not by e-mailing me directly)

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

Reply via email to