httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: APR Shared Memory Usage
Date Tue, 12 Apr 2011 14:45:46 GMT
>> I would assume that subsequent callers could use apr_shm_attach to then
>> attach to an existing shared memory segment, however, it appears that 
>> function is not used anywhere in the apache (2.2) code base whatsoever.
>> (It is used in one or two places in 2.3).

> I assume you don't see it in HTTP server because everyone inherits a
> reference to shared memory created in the parent process.   Of course
> outside of this you don't always have such a relationship.
> Maybe the testshm* in apr/test/ would be a good resource?  The APR
> tests are always easy to tinker with.

Ah...I am 99% with you. So the calls I am seeing are only made by the 
process? So I am assuming the parent process fork()s other processes, but 
*shared memory* pages are not subject to the Copy-on-Write handling as the
rest of the processes pages are?

So - if I follow other examples - if I were to create the shared memory 
in a ap_hook_post_config hook function, it would be assured to be set-up 
any child processes are forked, and inherited by them?

Thanks for the help.


View raw message