Sorry, just noticed this is very similar Mateus' email from earlier, so will wait for any responses to that...
-----Original Message----- From: Drew, Stephen Sent: 15 February 2006 15:33 To: sqlite-users@sqlite.org Subject: [sqlite] Shared Memory Question Hello all, An interesting use of the in-memory SQLite database would be to use it in shared memory and have the data shared between applications but stored once. The background to this is I am making local replicated copies of a main database, and as they are transient (they are read-only copies of the main database), there is no real need to have them on disk, or at least not permanently. To get around locking issues, obviously the whole database would need to be wrapped in a mutex (simple, slow approach), but what I was wondering is: Presumably, the in-memory database is in contiguous memory, as I guess the format is the same as the disk-based database format. Would it be a lot of work to be able to construct an in-memory database with a chunk of memory (allocated by the user), and a size? The database could then be created in shared memory, and a SQLITE_FULL error returned if the database attempted to grow outside this size limit. The shared memory segment could be flushed to disk independently and when the application decides. Is this a reasonable request and would this be useful to anyone else? Or is there something already present that I could use? Many thanks, Steve