Reputation: 63816
Cross-process memory buffers always have some overhead, and my understanding is this is quite high. But what if you're implementing a cross-process render-buffer, this isn't critically important in the same way as other data, so are there techniques we can use to get 'raw' access to a chunk of memory from multiple processes, with no safety nets apart from it not crashing? Or do modern operating systems simply not work with unabstracted memory in a way to make this possible... in the old days couldn't you get a pointer to ANY place in memory?
I'm working in C++ but the question applies to Win XP/Vista/7, MacOSX 10.5+ (& Linux less importantly).
Upvotes: 1
Views: 1020
Reputation: 1257
Memory mapped files are the way to go here.
Windows: CreateFileMapping()
POSIX: mmap()
Upvotes: 8