Durable shared memory -- like, a (loocal) database?! I'm kind of amazed at the degree of wheel-reinventing going on here.
If the person who CTO'd that worked for me, they would not be CTO any more.
Basically just take your hash structure and write it to disk.
The only problem with it is the 32bit offsets mean a 4GB max. Not too hard to fork it for 64bit offsets, though.
(other than misogynistic and crude library names) (shared memory -> require 'gangbang' or somesuch)