httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: Shared memory
Date Wed, 22 Nov 2006 20:29:04 GMT
On Wed, 22 Nov 2006 20:12:17 +0000
"Christiaan Lamprecht" <christiaanwork@googlemail.com> wrote:

> I'm trying to share some WRITABLE memory between apache requests...

Ambiguous requirement.

> This means that I'll need to use APR mutex's and the like but can
> anyone suggest where the best place is to store such writable data.
> (short of having to write it to a file, I'm looking for something less
> costly) Is the module's server/directory config space appropriate to
> write to at runtime?

You can use the server config for that.  You already know you need
the mutex; you'll also need to consider the lifetime of what's being
stored and avoid a memory (or similar resource) leak.  If your memory
is shared by all processes, it gets more complex.

My Chapter 4 has some examples covering a couple of scenarios.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

Mime
View raw message