On Thu, Jul 06, 2000 at 08:36:32PM -0700, Adam Wozniak wrote:
> Tom Zerucha wrote:
> > Is there a reason you need to do lots of small scattered writes so you
> > can't just allocate a bunch of records in a regular database and use
> > DmWrite (that is what I do in the similar circumstance).
> Actually, that was a great question. It looks like a lot of this is
> actually just large lookup tables. I suppose I can make them binary
> resources of some kind, and then munge a pointer to point at them.
> Would that ensure they don't take up memory in the dynamic heap?
> Can I rely on these records being locked down for me, or would I
> have to lock them myself?
Yes, you would have to: Open the database, Get the record, and Lock
the handle. This is sort of what happens when your app loads, but
automagically. You also have to unlock/release/close. But that can
be at the entry and exit to your code. The rest is to change
Bigarray[] to *Bigarray and point it at one of the records.
Note that these can be resource databases. My concorde program uses
this technique (as does my MIDI player) - I generate the compressed
data offline and just lock the resource I am decoding.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/