apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <i...@cnet.com>
Subject RE: Shared Memory Hash Table / SMS
Date Mon, 02 Jul 2001 18:39:26 GMT
On 02 Jul 2001 19:07:52 +0200, Sander Striker wrote:
> > Just wondering if any has got one of these going, 
> > how does the proposed SMS shared library handle pointers?
> Sorry Ian, we're not quite there yet, at least, if you
> mean a shared mem sms.
> I hope to commit the sms that handles multi threading in
> a nicer way tonight. I had planned on doing that yesterday,
> but was to tired to finish it.
> David and I briefly discussed a dual memory pool to
> implement shared memory. One for accounting, one to be
> the actual memory. There will probably be more discussion
> needed on the list first.
> What do you mean exactly with 'shared mem hash table / sms'?
> I mean, what kind of image is in your head? [curious]
I have to store info on about ~100-700,000 entries (~10-64M) which will
sit in a sparse number range. These will get hit on each page
request, so it needs to be fast. Originally the number range was dense
so I could use an array.

what I was thinking of doing was passing the 'max' to the hash_create
function, and using offsets instead of pointers in the structures (which
the function would allocate)

For my app, I don't need to worry about locking, as the table is
write-once (at start) read-many

If sms has the shared memory type I would use that, but for the moment
I'll just use the apr_shm functions 

I'll submit it for addition to apr-util if I can get it working.

> > ...Ian
> Sander

View raw message