#include <XrdSysShmem.hh>
|
| static std::tuple< void *, size_t > | create (const std::string &name, size_t size) |
| |
| template<typename T > |
| static std::tuple< T *, size_t > | get (const std::string &name) |
| |
| template<typename T > |
| static std::tuple< T *, size_t > | make_array (const std::string &name, size_t count) |
| |
| template<typename T , typename... Args> |
| static std::tuple< T *, size_t > | make_array (const std::string &name, size_t count, Args &&...args) |
| |
|
| static void * | map_shm (int fd, size_t size) |
| |
Utility class for creating and obtaining shared emory
| static std::tuple<void*, size_t> XrdSys::shm::create |
( |
const std::string & |
name, |
|
|
size_t |
size |
|
) |
| |
|
inlinestatic |
Helper function for creating shared memory block
- Parameters
-
| name | : name of the shared memory block (shared memory object should be identified by a name of the form /somename) |
| size | : size of the shared memory segment |
- Returns
- : pointer to the shared memory and its size
References close, fstat, ftruncate, map_shm(), and stat.
Referenced by make_array().
template<typename T >
| static std::tuple<T*, size_t> XrdSys::shm::get |
( |
const std::string & |
name | ) |
|
|
inlinestatic |
Helper function for getting shared memory block
- Parameters
-
| name | : name of the shared memory block (shared memory object should be identified by a name of the form /somename) |
- Returns
- : pointer to the shared memory and its size
References close, fstat, map_shm(), and stat.
template<typename T >
| static std::tuple<T*, size_t> XrdSys::shm::make_array |
( |
const std::string & |
name, |
|
|
size_t |
count |
|
) |
| |
|
inlinestatic |
Helper function for creating a shared memory block and constructing an array of objects of type T (constructed with default constructor) within the block.
- Parameters
-
| name | : name of the shared memory block (shared memory object should be identified by a name of the form /somename) |
| count | : size of the array |
- Returns
- : pointer to the shared memory and its size
References create().
template<typename T , typename... Args>
| static std::tuple<T*, size_t> XrdSys::shm::make_array |
( |
const std::string & |
name, |
|
|
size_t |
count, |
|
|
Args &&... |
args |
|
) |
| |
|
inlinestatic |
Helper function for creating a shared memory block and constructing an array of objects of type T (constructed with using arguments args) within the block.
- Parameters
-
| name | : name of the shared memory block (shared memory object should be identified by a name of the form /somename) |
| count | : size of the array |
| args | : the arguments for the T constructor |
- Returns
- : pointer to the shared memory and its size
References create().
| static void* XrdSys::shm::map_shm |
( |
int |
fd, |
|
|
size_t |
size |
|
) |
| |
|
inlinestaticprivate |
Helper function for mapping the shared memory block into user virtual address space
- Parameters
-
| fd | : handle to the shared memory segment |
| size | : size of the shared memory segment |
- Returns
- : pointer to the shared memory
Referenced by create(), and get().
The documentation for this struct was generated from the following file: