Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Share hash across processes

by TilRMan (Friar)
on Jun 09, 2007 at 04:49 UTC ( #620146=note: print w/replies, xml ) Need Help??

in reply to Share hash across processes

Have a look at mmap(3). Caveat: I've never used any of the Perl interfaces to mmap.

Replies are listed 'Best First'.
Re^2: Share hash across processes
by bart (Canon) on Jun 09, 2007 at 06:43 UTC
    Yet there are quite a few of them on CPAN.

    I recall somebody even made a mmap module that works on Win32; the author was here and on the chatterbox while he was working on it, but I don't remember what user that was.

    Maybe it was IPC::Mmap? Ah, no, it must have been Win32::MMF, the name rings a bell. Well, both look like reasonable approaches to me, and both have gotten recent updates, which is a promise it'll most likely still work well. But don't discard the other candidates just yet.

    From the top of the thread:

    I have a hash (with about 20-25 keys) with very long bit strings as values (1-2MB) that I would like to share directly (readonly) in memory.
    That looks like an acceptably small number of keys, so the most sane approach to me seem to make a separate mmapped file per hash item. If the keys form a fixed set, you don't even actually have to share the list of names.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://620146]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2018-02-19 12:58 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (264 votes). Check out past polls.