httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Morris <>
Subject shared table (create a pool from a block of memory?)
Date Fri, 03 Aug 2007 21:54:24 GMT
    We would like to use an APR table to share
data between processes or threads where the data
is a buit more than one would want to manage
in a raw block of shared memory.  Searching this
list, on Google, and looking through the source
I've found several people wanting to do soemthing
similar, and some answers on how to get a block of
raw shared memory that could be used to share
something simple like a single integer.

    More complex data needs to be held in a structure
like a table, though.  I see no function to create a
table from raw memory, only from a pool.  Perhaps there
is some function that create a pool from a chunk of memory
that I'm not finding?  That is to say, something that
could be used like this:

void *memory;
apr_pool_t * newpool;

memory = malloc(BIG_CHUNK);
apr_pool_create_from_memory(&newpool, memory);

    It seems to me that if there is some function to
create a pool from memory, that would mean that creating
the pool from SHARED memory would result in a SHARED
pool, from which we could create all kinds of shared
structures - shared tables or anything else that needed
to be shared.  Any ideas?  Thanks.
Ray B. Morris

View raw message