apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <i...@cnet.com>
Subject Re: [PATCH/CONTRIB] Shared Mem Hash Table
Date Thu, 05 Jul 2001 15:34:36 GMT
On 05 Jul 2001 09:07:26 -0400, Bill Stoddard wrote:
> > This implements a hash table using shared memory.
> > Limitations:
> >     * doesn't have a freelist, so deletes aren't reclaimed
> >     * and can't expand it's size (dont know how to implement this with  current
> memory system)
> To the best of my knowledge, you cannot expand a shared memory segment (after fork) and
> ensure that all processes use the exact same addresses to access that memory.  If one
> your processes increases the size of the hash table, you have forever screwed up the
> table for all the other processes because you now have addresses in the table that may
> point to completely different storage in all the other processes.

yep... thats true.
what I was planning to do was to have a 'generation' in the header
section (which never changes size), and the non-shared memory section,
and we would increment this when we expanded. the get/set functions
would check the generation flag before anything and would re-open the
shared memory segments NAME+GEN. ...but with the current shared mem
implementation only the parent process can create shared memory, so I
left it as a limitation, as the future SMS might fix this

> Bill

View raw message