GLib.Aligned
Description:
Content:
Functions:
- public void* alloc (size_t n_blocks, size_t n_blocks_bytes, size_t alignment)
This function is similar to malloc, allocating (
n_blocks
*n_block_bytes
) bytes, but care is taken to align the allocated memory to with the given alignment value. - public void* alloc0 (size_t n_blocks, size_t n_blocks_bytes, size_t alignment)
This function is similar to alloc, but it will also clear the allocated memory before returning it.
- public void free (void* mem)
Frees the memory allocated by alloc.
- public void free_sized (void* mem, size_t alignment, size_t size)
Frees the memory pointed to by
mem
, assuming it is has the givensize
andalignment
.