Function
GLibatomic_rc_box_alloc
since: 2.58
Declaration [src]
gpointer
g_atomic_rc_box_alloc(
gsizeblock_size
)
Description [src]
Allocates block_size bytes of memory, and adds atomic
reference counting semantics to it.
The data will be freed when its reference count drops to zero.
The allocated data is guaranteed to be suitably aligned for any built-in type.
Available since: 2.58
Parameters
block_size-
Type:
gsizeThe size of the allocation, must be greater than 0.
Return value
Type: gpointer
A pointer to the allocated memory.
The caller of the function takes ownership of the data, and is responsible for freeing it.