1MEMKIND_FIXED(3) MEMKIND_FIXED MEMKIND_FIXED(3)
2
3
4
6 memkind_fixed - memkind operations on user-defined memory.
7 Note: This is EXPERIMENTAL API. The functionality and the header file
8 itself can be changed (including non-backward compatible changes) or
9 removed.
10
12 int memkind_fixed_create(struct memkind *kind, struct memkind_ops *ops,
13 const char *name);
14 int memkind_fixed_destroy(struct memkind *kind);
15 void *memkind_fixed_mmap(struct memkind *kind, void *addr, size_t
16 size);
17
19 The fixed memory memkind operations enable memory kinds built on user-
20 defined memory. Such memory may have different attributes, depending
21 on how the memory mapping was created.
22
23 The fixed kinds are most useful when a specific memory characteristics,
24 e.g. numa binding, which are not fully supported by other memkind API,
25 need to be manipulated.
26
27 The most convenient way to create fixed kinds is to use memkind_cre‐
28 ate_fixed() (see memkind(3)).
29
30 memkind_fixed_create() is an implementation of the memkind "create" op‐
31 eration for kinds that are created on the memory area supplied by the
32 user. It allocates space for some fixed-kind-specific metadata, then
33 calls memkind_arena_create() (see memkind_arena(3))
34
35 memkind_fixed_destroy() is an implementation of the memkind "destroy"
36 operation for kinds that are created on the memory area supplied by the
37 user. This releases all of the resources allocated by
38 memkind_fixed_create() , but please note that it does not de-allocate
39 the underlying memory.
40
41 memkind_fixed_mmap() allocates the file system space for a block of
42 size bytes in the memory-mapped file associated with given kind. The
43 addr hint is ignored. The return value is the address of mapped memory
44 region or MAP_FAILED in the case of an error.
45
46
47 COPYRIGHT
48 Copyright (C) 2021 Intel Corporation. All rights reserved.
49
51 memkind(3), memkind_arena(3), memkind_default(3), memkind_hbw(3),
52 memkind_hugetlb(3), libvmem(3), jemalloc(3), mbind(2), mmap(2)
53
54
55
56Intel Corporation 2021-12-08 MEMKIND_FIXED(3)