![]() |
Home | Libraries | People | FAQ | More |
boost::interprocess::xsi_shared_memory
// In header: <boost/interprocess/xsi_shared_memory.hpp> class xsi_shared_memory { public: // construct/copy/destruct () ; (open_only_t, ); (create_only_t, xsi_key &, , permissions & = permissions()); (open_or_create_t, xsi_key &, , permissions & = permissions()); (open_only_t, xsi_key &); (xsi_shared_memory &&) ; xsi_shared_memory & (xsi_shared_memory &&) ; ~(); // public member functions (xsi_shared_memory &) ; () ; () ; // public static functions (); };
A class that wraps XSI (System V) shared memory. Unlike shared_memory_object, xsi_shared_memory needs a valid xsi_key to identify a shared memory object.
Warning: XSI shared memory and interprocess portable shared memory (boost::interprocess::shared_memory_object) can't communicate between them.
xsi_shared_memory
public
construct/copy/destruct() ;
Default constructor. Represents an empty xsi_shared_memory
.
(open_only_t, shmid);
Initializes *this with a shmid previously obtained (possibly from another process) This lower-level initializer allows shared memory mapping without having a key.
(create_only_t, xsi_key & key, size, permissions & perm = permissions());
Creates a new XSI shared memory from 'key', with size "size" and permissions "perm". If the shared memory previously exists, throws an error.
(open_or_create_t, xsi_key & key, size, permissions & perm = permissions());
Opens an existing shared memory with identifier 'key' or creates a new XSI shared memory from identifier 'key', with size "size" and permissions "perm".
(open_only_t, xsi_key & key);
Tries to open a XSI shared memory with identifier 'key' If the shared memory does not previously exist, it throws an error.
(xsi_shared_memory && moved) ;
Moves the ownership of "moved"'s shared memory object to *this. After the call, "moved" does not represent any shared memory object. Does not throw
xsi_shared_memory & (xsi_shared_memory && moved) ;
Moves the ownership of "moved"'s shared memory to *this. After the call, "moved" does not represent any shared memory. Does not throw
~();
Destroys *this. The shared memory won't be destroyed, just this connection to it. Use remove() to destroy the shared memory.
xsi_shared_memory
public member functions(xsi_shared_memory & other) ;Swaps two xsi_shared_memorys. Does not throw.
() ;
Returns the shared memory ID that identifies the shared memory
() ;
Returns the mapping handle. Never throws