1PMEMCTO_ALIGNED_ALLOC(3)   PMDK Programmer's Manual   PMEMCTO_ALIGNED_ALLOC(3)
2
3
4

NAME

6       pmemcto_aligned_alloc - allocate aligned memory
7

SYNOPSIS

9              #include <libpmemcto.h>
10
11              void *pmemcto_aligned_alloc(PMEMctopool *pcp, size_t alignment, size_t size);
12

DESCRIPTION

14       The  pmemcto_aligned_alloc()  function  provides  the same semantics as
15       aligned_alloc(3), but operates on the memory pool pcp  instead  of  the
16       process  heap supplied by the system.  It allocates size bytes from the
17       memory pool and returns a pointer to the allocated memory.  The  memory
18       is  not  zeroed.   The  memory address will be a multiple of alignment,
19       which must be a power of two.
20

RETURN VALUE

22       On success, pmemcto_aligned_alloc() function returns a pointer  to  the
23       allocated  memory.   If size is 0, then pmemcto_aligned_alloc() returns
24       either NULL, or a unique pointer value that can later  be  successfully
25       passed  to  pmemcto_free(3).   If  pmemcto_aligned_alloc() is unable to
26       satisfy the allocation request, a NULL pointer is returned and errno is
27       set appropriately.
28

ERRORS

30       EINVAL alignment was not a power of two.
31
32       ENOMEM Insufficient memory available to satisfy allocation request.
33

SEE ALSO

35       aligned_alloc(3),  malloc(3), jemalloc(3), pmemcto_malloc(3), libpmemc‐
36       to(7) and <http://pmem.io>
37
38
39
40PMDK - libpmemcto API version 1.0 2018-07-20          PMEMCTO_ALIGNED_ALLOC(3)
Impressum