|
| | catch (...) |
| | catch (...) |
| void | free () noexcept |
| void | free () noexcept |
| memory & | initialize (const std::string &name, uint32_t version, size_t size=0) |
| memory & | initialize (const std::string &name, uint32_t version, size_t size=0) |
| memory & | initialize (size_t size=0) |
| memory & | initialize (size_t size=0) |
| reference & | initialize (const std::string &name) |
| | memory ()=default |
| | memory ()=default |
| | memory (const std::string &name, uint32_t version, size_t size=0) noexcept |
| | memory (const std::string &name, uint32_t version, size_t size=sizeof(buffer_t) - sizeof(header)) noexcept |
| | operator bool () const noexcept |
| | true if this shared memory is currently in use by some process - a cheap, non-destructive existence probe (shm_open without O_CREAT, then immediately close) that neither maps nor creates anything itself.
|
| | operator bool () const noexcept |
| | true if this shared memory is currently in use by some process - a cheap, non-destructive existence probe (open, then immediately close, the underlying file mapping object by name) that neither maps nor creates anything itself. Crash-safe without any separate refcounting primitive: the OS keeps the file mapping kernel object alive exactly as long as any process holds a real (mapped) handle to it, closing it automatically on that process' crash/exit.
|
| | operator buffer_t & () |
| | operator buffer_t & () |
| | operator buffer_t * () |
| | operator buffer_t * () |
| | operator const os_event () const noexcept |
| | operator const os_event () const noexcept |
| | operator os_event () noexcept |
| | operator os_event () noexcept |
| | operator struct ::stat () |
| buffer_t & | operator* () |
| buffer_t & | operator* () |
| buffer_t * | operator-> () |
| buffer_t * | operator-> () |
| | operator::HANDLE () const noexcept |
| | operator::HANDLE () const noexcept |
| memory & | operator= (const buffer_t &buffer) |
| memory & | operator= (const buffer_t &buffer) |
| bool | release () noexcept |
| | releases this hold
|
| bool | release () noexcept |
| | releases this hold
|
| size_t | size () const |
| | ~memory () |
| | ~memory () noexcept |
template<typename buffer_t>
class dx::shared::memory< buffer_t >
macOS user space shared memory
windows user space shared memory
The constructor only stores the canonical name/version/size - the actual mapping only happens once the buffer is first genuinely requested (through one of the pointer/reference accessors), not eagerly at construction: whichever side (server or client) first actually wants the buffer becomes the creator, rather than whichever side's device object simply happens to construct first.
The constructor only stores the requested name/version/size - the actual mapping only happens once the buffer is first genuinely requested (through one of the pointer/reference accessors), not eagerly at construction: whichever side (server or client) first actually wants the buffer becomes the creator, rather than whichever side's device object simply happens to construct first.
template<typename buffer_t>
true if this shared memory is currently in use by some process - a cheap, non-destructive existence probe (open, then immediately close, the underlying file mapping object by name) that neither maps nor creates anything itself. Crash-safe without any separate refcounting primitive: the OS keeps the file mapping kernel object alive exactly as long as any process holds a real (mapped) handle to it, closing it automatically on that process' crash/exit.