Packages
glib-2.0
GLib
Aligned
alloc
alloc0
free
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
.