Hi R�gis,

My bet is that you're fragmenting memory a lot. PalmOS does a routine to
de-fragment the memory on reset, so the time that it appear "freezed" is
the time it's using doing the de-fragmentation.

Using a handle *could* (I don't really know) minimize the fragmentation,
but it's just a guess since we don't know what your code is really doing.

IMHO PalmOS doesn't "like" many allocs->deallocs cycles, unless you're
using handles (witch the OS manipulate while your program is running to
minimize fragmentation).

Try to allocate one buffer on app start and free it on the end, and use it
on your program. Use a handle and lock it whenever you need to. It's just
a bet, but can work.

Cheers.

---
J. Machado
[EMAIL PROTECTED]
Palmcon Consultoria (www.palmcon.com.br)
+55 21 9302-2794

> Hy all!
>
> My application uses NetLib to send and receive information from a server.
> The app has a Char pointer, that has 2000 bytes of size, that is alocated
> and freed correctly.
>
> The Pointer is declared with MemPtrNew and freed with MemPtrFree, and
> MemMove is very used  during all the process.
>
> But, sometimes (about 1 time for each 500 executions), the system freezes
> and, after doing a soft reset, the freezes on the Palm Logo Screen (Palm
> Zire21)
> or the screen starts blinking (Palm M130)
>
> I don't know what is causing this, but i think that this should be
> heapennig
> because I using MemPtrNew instead of MemHandleNew, and, sometimes, any
> data
> on Palm get currupted and the system cant start. Only a hard reset could
> make palm working again...
>
> Does anybody can help me to solve this problem?
>
> Thanks all!
>
> R�gis Daniel de Oliveira
>
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
>


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

Reply via email to