At 7:24 PM +0100 15-03-00, Sudipta Ghose wrote:
>We use handles to create multiple of indices for a database. However we
>always use MemHandleResize. The declaration as par the API docs is
>
>Err MemHandleResize (VoidHandle h, ULong newSize)
>
>As you can see h is not a pointer to a handle, there is no way the function
>could change the value of h and return it. So, I assumed MemHandleResize
>never changes a handle.
That's correct. MemHandleResize will return an error if there's not enough
space in the current heap to handle the resizing.
>Whereas DmResizeRecord returns a handle. Chances
>are there, that it will be different than the one I passed. Till now I have
>not faced any problems with this scheme.
This will never happen on 3.x OS's, because the data manager uses only one
heap. This could happen on older OSs though. And it may happen again in
the future.
The current data manager and memory manager have an 16M limit built in, due
to the widths of some data structures. If we ever have devices with >16M
of storage space, then we'll either have to do a rather serious update to
the data and memory managers to widen the private data structures, or (more
likely) have multiple storage heaps.
Of course, with 16M per storage heap it's pretty unlikely that one or the
other will be out of space... but who knows what people will do with
devices that have huge memory models.
--Bob
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html