1PMEMCTO_SET_ROOT_POINTER(3)PMDK Programmer's ManualPMEMCTO_SET_ROOT_POINTER(3)
2
3
4
6 pmemcto_set_root_pointer, pmemcto_get_root_pointer - set or obtain the
7 root object pointer
8
10 #include <libpmemcto.h>
11
12 void pmemcto_set_root_pointer(PMEMctopool *pcp, void *ptr);
13 void *pmemcto_get_root_pointer(PMEMctopool *pcp);
14
16 The root object of persistent memory pool is an entry point for all
17 other persistent objects allocated using the libpmemcto(7) APIs. In
18 other words, every single object stored in persistent memory pool
19 should have the root object at the end of its reference path. There is
20 exactly one root object in each pool.
21
22 The pmemcto_set_root_pointer() function saves the pointer to the root
23 object in given pool. The ptr must have been returned by a previous
24 call to pmemcto_malloc(3), pmemcto_calloc(3), pmemcto_realloc(3) or
25 pmemcto_aligned_alloc(3) for the same pool of memory.
26
27 The pmemcto_get_root_pointer() function returns the pointer to the root
28 object in given pool, or NULL if the root pointer was never set.
29
31 The pmemcto_set_root_pointer() function returns no value.
32
33 The pmemcto_get_root_pointer() function returns the pointer to the root
34 object in given pool, or NULL if the root pointer was never set.
35
37 pmemcto_aligned_alloc(3), pmemcto_calloc(3), pmemcto_malloc(3), pmemc‐
38 to_realloc(3), libpmemcto(7) and <http://pmem.io>
39
40
41
42PMDK - libpmemcto API version 1.0 2018-07-20 PMEMCTO_SET_ROOT_POINTER(3)