[Q] Berkeley DB for Squeak
Stephen Pair
spair at acm.org
Tue Jun 25 19:17:28 UTC 2002
> On Tuesday 25 June 2002 10:50 am, Stephen Pair wrote:
> > I've posted the code as is, with a brief overview at:
> > http://spair.swiki.net/24
>
> Thanks, Stephen!
>
> Three questions:
>
> 1. Where's the C part that lives between the plugin and BerkeleyDB?
> (i.e sqDbCursor())
Oops! I forgot! DatabasePlugin.h and sqBerkeleyDatabase.c are now on
the website.
> 2. Is primitiveDbCursor: the only primitive needed? It's the only one
> I noticed... but I see references to primDbClose: as well (but no
> definitions). And I don't see primitiveDbCursor: being called from
> anywhere.
Oops! It appears I had things spread over a couple of change sets. I've
uploaded DBMapping.2.cs that should include all of the primitives.
> 3. Can this be used safely from multiple processes? I see that you're
> doing mark/sweep garbage collection on the DB itself; is this
> multi-process safe?
No, I haven't done anything yet to ensure process safety. You should
definitely not use the DB while running garbage collection.
Here's a little tip...if you want to examine the layout of an object
cluster, use PdbPersistentMemory>>interpret:. That methods takes a
PdbObjectReference as a parameter, fetches the bytes for that pid, and
answers a string describing the bytes stored at that pid.
- Stephen
More information about the Squeak-dev
mailing list
|