If there is any way to estimate the amount of data coming in, you can allocate a large
handle of memory and then lock it down. Then
you know that for the rest of the time you write there, it will be around. You'll
need to keep track of what you write there with
your own counters. It isn't that much overhead.
Once you are done, you can resize the memory handle to a size smaller than you have
allocated. To really play it safe, allocate
another handle to as much memory you have written, copy from the previous memory
block, purge that old block and you haven't wasted
memory.
Steve
Paul Nevai wrote:
> Please advise me...
>
> I know that I will need to create many records with a total size of X Kb.
> This will be accomplished in many DmWrite operations. The question is how I
> could assure in the very beginning that I will have enough RAM and none of
> the DmWrites will fail. Yes, I know of DmWriteCheck, but, as I said before, I
> will have very many DmWrites. Thanks! Best regards, Paul
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see
>http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/