Re: non-stop generational modperl config update strategies?
"Cosimo Streppone" <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <op.vbiqyrics5ttvb@cd01> |
On Wed, 21 Apr 2010 17:10:00 +0200, Torsten Förtsch <[email protected]> wrote: > On Wednesday 21 April 2010 16:59:01 Perrin Harkins wrote: >> In both cases you have the same drawback: it's impossible to read >> anything from the shared data without copying the data you read into >> perl variables. >> [...] >> > no, MMapDB creates read-only variables that reference the mmapped block. > It manipulates SvPVX directly: > > SvPV_set(sv, pointer); > SvLEN_set(sv, 0); # this makes sure perl won't try to free() the > space > [...] > You can then pass around references to that variable and nothing will be > copied. Cool! So, if I understand correctly: using something like Cache::FastMmap creates copy of your strings/values/... in your process memory. See the "fc_read" function. Is this correct? http://cpansearch.perl.org/src/ROBM/Cache-FastMmap-1.35/Cache-FastMmap-CImpl/CImpl.xs I guess pretty much anything else works that way, not just Cache::FastMmap. -- Cosimo