On Thu, 21 Nov 2002 16:51:55 -0600
Ben Combee <[EMAIL PROTECTED]> wrote:

> 
> >My records can have a variable length: maybe that's the right time to fix them
> >or i'll have to put a jump table on each "big" record.
> 
> I'd use a power of two for your split size, just to make the math faster.
> 
> Put a header of offsets for whatever split size you use at the front of 
> your record.  To get to record (REAL_N), you'd go to record (REAL_N / 64), 
> get offset (REAL_N % 64), add that value to the pointer value at the start 
> of the record, and there you go.  You'll need your own resize/readjust 
> pointer pool code, but that's life.

While we are there.. ;) any suggestion on how to keep the whole thing sorted?

I could add new records to the end and then do an insertion sort
(the db should be almost sorted), or there's a better way?

-- 

 Alessandro Zummo,
  Tower Technologies - Turin, Italy

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

Reply via email to