Files | |
file | SharedMemoryAllocatorUsr.h |
Shared Memory Allocator Driver User Header. | |
Functions | |
int | SHM_alloc (int size, shm_buf *buf) |
Allocate shared memory block with given size. More... | |
int | SHM_alloc_aligned (int size, uint alignment, shm_buf *buf) |
Allocate n-bytes aligned shared memory block with given size. The alignment will be with respect to the physical memory address. More... | |
int | SHM_alloc_fromBlock (int size, int blockID, shm_buf *buf) |
Allocate shared memory block with given size and block ID. More... | |
int | SHM_alloc_aligned_fromBlock (int size, uint alignment, int blockID, shm_buf *buf) |
Allocate n-bytes aligned shared memory block with given size and block ID. More... | |
int | SHM_alloc_aligned_fromBlock_withFlags (int size, uint alignment, int blockID, shm_buf *buf, int prot, int flags) |
Allocate n-bytes aligned shared memory block with given size, block ID, and specified flags. More... | |
int | SHM_get_blkInfo (int blockID, shm_buf *buf) |
Retrieves shared memory struct data for specified shared memory block. More... | |
int | SHM_release (shm_buf *buf) |
Frees shared memory block. More... | |
int SHM_alloc | ( | int | size, |
shm_buf * | buf | ||
) |
Allocate shared memory block with given size.
size | [in] Size in bytes to allocate. |
buf | [out] Pointer to shared memory buffer structure. |
int SHM_alloc_aligned | ( | int | size, |
uint | alignment, | ||
shm_buf * | buf | ||
) |
Allocate n-bytes aligned shared memory block with given size. The alignment will be with respect to the physical memory address.
size | [in] Size in bytes to allocate. |
alignment | [in] Alignment for physical address to be alignment-bytes aligned. |
buf | [out] Pointer to shared memory buffer structure. |
int SHM_alloc_fromBlock | ( | int | size, |
int | blockID, | ||
shm_buf * | buf | ||
) |
Allocate shared memory block with given size and block ID.
size | [in] Size in bytes to allocate. |
blockID | [in] Block ID in which to allocated. |
buf | [out] Pointer to shared memory buffer structure. |
int SHM_alloc_aligned_fromBlock | ( | int | size, |
uint | alignment, | ||
int | blockID, | ||
shm_buf * | buf | ||
) |
Allocate n-bytes aligned shared memory block with given size and block ID.
size | [in] Size in bytes to allocate. |
alignment | [in] Alignment for physical address to be alignment-bytes aligned. |
blockID | [in] Block ID in which to allocated. |
buf | [out] Pointer to shared memory buffer structure. |
int SHM_alloc_aligned_fromBlock_withFlags | ( | int | size, |
uint | alignment, | ||
int | blockID, | ||
shm_buf * | buf, | ||
int | prot, | ||
int | flags | ||
) |
Allocate n-bytes aligned shared memory block with given size, block ID, and specified flags.
size | [in] Size in bytes to allocate. |
alignment | [in] Alignment for physical address to be alignment-bytes aligned. |
blockID | [in] Block ID in which to allocated. |
buf | [out] Pointer to shared memory buffer structure. |
prot | [in] Protection bits for virtually mapped addresses. For more information, check mmap() documentation in the "see also" section. |
flags | [in] Flags for virtually mapped addresses. For more information, check mmap() documentation in the "see also" section. |
int SHM_get_blkInfo | ( | int | blockID, |
shm_buf * | buf | ||
) |
Retrieves shared memory struct data for specified shared memory block.
blockID | [in] Block ID for info to be retrieved. |
buf | [out] Pointer to shared memory buffer structure. |
int SHM_release | ( | shm_buf * | buf | ) |
Frees shared memory block.
buf | [out] Pointer to shared memory buffer structure. |