> Use unbuffered open/read/write/close, not the buffered f* varieties.
> Use seek() to locate and then write() to write a block.

Will these functions allow me to specify the size of the output I write?
I would really like to be able to flush specific blocks to disk (leaving
the rest of the database as was), and to be able to read only specific
blocks to memory.                

I understand the dangers involved, but have written a fairly good disk manager
that handles threadsafe multiple access to the database, ensuring that no
two blocks are being accessed at the same time (threads need to obtain leases
on the blocks before accessing them, and the lease handler is thread-safe).

The two options I can see are either using fread and fwrite to handle to IO

or to create my own stream type using the cookie stuff.

Does you have experience creating stream types (it looks more
than a bit difficult!)

Thanks

Stephen

--
"My name is Ozymandias, king of kings:
 Look on my works, ye Mighty, and despair!"
-Percy Bysshe Shelley


--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to