httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@foogod.com
Subject Shared memory questions
Date Sat, 31 Aug 2002 08:04:41 GMT
Hello again,

The module I'm in the middle of writing will have a need to share information
between all the different threads/processes using it, and the cleanest way to
do this that I see would be to take advantage of shared memory.

I've been looking over the APR shared memory routines, and have a few
questions, mainly regarding portability..

First the big question:  How portable is shared memory use across the various
platforms httpd-2.0 compiles on?  The impression I get is that it's fairly well
supported, but nothing I've found actually says.  Are there platforms which
don't support shared memory at all (through APR), and if so what are they?
(I'm trying to decide whether my module needs to have some sort of a backup
plan for sharing information)

Second question:  I want to make sure that the shared memory segment used by my
module gets properly destroyed when everything is finished using it.  What is
the correct way to go about this?  Is it safe/effective to call apr_shm_destroy
when other processes may still be using the memory segment?  if not, is there
some way to tell whether the segment is still in use or not?

-alex

Mime
View raw message