PipeWire
0.2.0
|
Memory block structure. More...
Public Types | |
enum | pw_memblock_flags |
Flags passed to pw_memblock_alloc() More... | |
Public Member Functions | |
int | pw_memblock_map (struct pw_memblock *mem) |
Map a memblock. More... | |
int | pw_memblock_alloc (enum pw_memblock_flags flags, size_t size, struct pw_memblock **mem) |
Create a new memblock. More... | |
void | pw_memblock_free (struct pw_memblock *mem) |
Free a memblock. More... | |
Data Fields | |
enum pw_memblock_flags | flags |
flags used when allocating More... | |
int | fd |
memfd if any More... | |
off_t | offset |
offset of mappable memory More... | |
void * | ptr |
ptr to mapped memory More... | |
size_t | size |
size of mapped memory More... | |
Memory block structure.
enum pw_memblock_flags |
Flags passed to pw_memblock_alloc()
int pw_memblock_alloc | ( | enum pw_memblock_flags | flags, |
size_t | size, | ||
struct pw_memblock ** | mem | ||
) |
Create a new memblock.
flags | memblock flags | |
size | size to allocate | |
[out] | mem | memblock structure to fill |
References F_ADD_SEALS, F_SEAL_GROW, F_SEAL_SEAL, F_SEAL_SHRINK, fd, flags, memblock::mem, MFD_ALLOW_SEALING, MFD_CLOEXEC, offset, ptr, pw_log::pw_log_error(), pw_log::pw_log_warn(), PW_MEMBLOCK_FLAG_MAP_TWICE, PW_MEMBLOCK_FLAG_SEAL, PW_MEMBLOCK_FLAG_WITH_FD, pw_memblock_map(), and size.
Referenced by pw_control_link(), and pw_memblock_import().
void pw_memblock_free | ( | struct pw_memblock * | mem | ) |
Free a memblock.
mem | a memblock |
References fd, flags, memblock::link, memblock::mem, ptr, pw_log::pw_log_debug(), PW_MEMBLOCK_FLAG_WITH_FD, and size.
Referenced by pw_control_destroy().
int pw_memblock_map | ( | struct pw_memblock * | mem | ) |
Map a memblock.
mem | a memblock |
References fd, flags, offset, ptr, pw_log::pw_log_debug(), PW_MEMBLOCK_FLAG_MAP_READ, PW_MEMBLOCK_FLAG_MAP_READWRITE, PW_MEMBLOCK_FLAG_MAP_TWICE, PW_MEMBLOCK_FLAG_MAP_WRITE, and size.
Referenced by pw_memblock_alloc(), and pw_memblock_import().
int pw_memblock::fd |
memfd if any
Referenced by pw_memblock_alloc(), pw_memblock_free(), pw_memblock_import(), and pw_memblock_map().
enum pw_memblock_flags pw_memblock::flags |
flags used when allocating
Referenced by pw_memblock_alloc(), pw_memblock_free(), pw_memblock_import(), and pw_memblock_map().
off_t pw_memblock::offset |
offset of mappable memory
Referenced by pw_memblock_alloc(), pw_memblock_import(), and pw_memblock_map().
void* pw_memblock::ptr |
ptr to mapped memory
Referenced by pw_control_link(), pw_memblock_alloc(), pw_memblock_free(), and pw_memblock_map().
size_t pw_memblock::size |
size of mapped memory
Referenced by pw_memblock_alloc(), pw_memblock_free(), pw_memblock_import(), and pw_memblock_map().