48#ifndef __R_MEM_NUMA_H__
49#define __R_MEM_NUMA_H__
51#if !defined(__RLIB_H_INCLUDE_GUARD__) && !defined(RLIB_COMPILATION)
52#error "#include <rlib.h> only please."
131 const RBitset * nodeset) R_ATTR_MALLOC;
#define R_API
Public-API decoration: resolves to R_API_EXPORT while building rlib and R_API_IMPORT for consumers.
Definition rmacros.h:115
#define R_BEGIN_DECLS
Open an extern "C" block under C++ (no-op in C).
Definition rmacros.h:196
rboolean r_mem_numa_interleave(rpointer ptr, rsize size, const RBitset *nodeset)
Interleave the pages spanning ptr across nodeset.
void r_mem_numa_free(rpointer ptr, rsize size)
Release an allocation from this API.
rboolean r_mem_numa_available(void)
Whether this build and this machine actually place allocations on the node they are asked for.
rboolean r_mem_numa_bind(rpointer ptr, rsize size, ruint node)
Bind the pages spanning ptr to node node.
rpointer r_mem_numa_alloc_onnode(rsize size, ruint node)
Allocate size bytes bound to NUMA node node.
rpointer r_mem_numa_alloc_local(rsize size)
Allocate size bytes placed by the system's default policy.
rpointer r_mem_numa_alloc_interleaved(rsize size, const RBitset *nodeset)
Allocate size bytes spread page-by-page across nodeset.
rsize r_mem_numa_page_size(void)
Granularity every allocation here is rounded up to.
rboolean r_mem_numa_node_of(rconstpointer ptr, ruint *node)
Which node currently backs the page containing ptr.
int rboolean
Boolean type (typedef'd to int).
Definition rtypes.h:59
unsigned int ruint
Unsigned int.
Definition rtypes.h:157
void * rpointer
Generic pointer (alias for void *).
Definition rtypes.h:327
const void * rconstpointer
Generic const pointer (alias for const void *).
Definition rtypes.h:329
unsigned long rsize
Unsigned pointer-sized size type (like size_t).
Definition rtypes.h:290
Fixed-width bitset with bit / byte / word accessors and bitwise compound operations.
Foundational type aliases used by every rlib header.
Fixed-width bitset.
Definition rbitset.h:68