4 ms·
Win32 has an API for shared memory that is straightforward to use. You use CreateFileMapping with an INVALID_HANDLE for the file to create a mapping which is l
by kazinator 11y ago
Win32 has an API for shared memory that is straightforward to use. You use CreateFileMapping with an INVALID_HANDLE for the file to create a mapping which is like MAP_ANONYMOUS in mmap (not backed by a file). It is not literally anonymous because you can give the mapping a name (similar to, say, a POSIX semaphore name in sem_open). Other processes can attach to the mapping using the name. To actually instantiate the mapping in the address space, you use the MapViewOfFile function.
MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/aa366551%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
Been years since I used this stuff.