in reply to Sharing a rather large data structure between siblings

If you are sure the data never changes, you can read it in before the apache child processes are fork()ed - for example in startup.pl. On (most) unixes at least, fork() is implemented via copy-on-write, which means child processes share all memory pages as long as they aren't changed.

edit: creating new references to the data and some other "read-only" operations still write to the internal data structures, so this might not be the best solution. It is pretty simple to implement, though.

  • Comment on Re: Sharing a rather large data structure between siblings