Would you post more info about previous attempts at this? I was about to create precisely that. Literally today.
But if it's fundamentally unworkable...
Would you post more info about previous attempts at this? I was about to create precisely that. Literally today.
But if it's fundamentally unworkable...
Having a serialization layer in distributed applications is a pretty vanilla requirement... I am also confused about the "unworkable" comment.
The "multiprocessing" module (which I have heard some not-so-good things about) automatically serializes Python objects over byte streams using pickle or some such thing.
Would someone please help me out and point me at a way of efficiently exposing a read-only block of memory to Python?
EDIT: Looks like "MemoryView" introduced in 2.7 is the answer.
as for shared memory, have you tried just mmap'ing the node from /dev/shm ?
EDIT: I just saw your edit. That's what I'm doing --- shm_open(), ftruncate(), then mmap(). A little annoying that it doesn't automatically kill the shared memory when the program terminates, but still...