MEMKIND_FIXED(3)
β¨ MEMKIND_FIXED β¨
okay bestie, we're doing memkind_fixed today β the MEMKIND_FIXED(3) girlies know π
πΈ NAME πΈ
memkind_fixed β memkind operations on user-defined memory.
π¨ NOTE: This is EXPERIMENTAL API. The functionality and the header file itself can be changed (including non-backward compatible changes) or removed. So likeβ¦ don't build your whole personality on it, k? π
π¦ SYNOPSIS π¦
int memkind_fixed_create(struct memkind *kind, struct memkind_ops *ops,
const char *name);
int memkind_fixed_destroy(struct memkind *kind);
void *memkind_fixed_mmap(struct memkind *kind, void *addr, size_t size);
π DESCRIPTION π
The fixed memory memkind operations enable memory kinds built on user-defined memory. Such memory may have different attributes, depending on how the memory mapping was created. it's giving customizable, fr fr β¨
The fixed kinds are most useful when a specific memory characteristics, e.g. numa binding, which are not fully supported by other memkind API, need to be manipulated. like when the basic options just aren't serving and you need to take matters into your own hands π
The most convenient way to create fixed kinds is to use memkind_create_fixed() (see memkind(3)). easiest slay of your life π«Ά
memkind_fixed_create() is an implementation of the memkind "create" operation for kinds that are created on the memory area supplied by the user. It allocates space for some fixed-kind-specific metadata, then calls memkind_arena_create() (see memkind_arena(3)). so it's doing the lil admin work and then handing off to the arena bestie π
memkind_fixed_destroy() is an implementation of the memkind "destroy" operation for kinds that are created on the memory area supplied by the user. This releases all of the resources allocated by memkind_fixed_create(), but please note that it does not de-allocate the underlying memory. so it cleans up its own mess but leaves your memory exactly where it was, iconic behavior honestly π
memkind_fixed_mmap() allocates the file system space for a block of size bytes in the memory-mapped file associated with given kind. The addr hint is ignored β she does not care, she does not listen π. The return value is the address of mapped memory region or MAP_FAILED in the case of an error. so check that return value bestie, don't be out here raw-dogging error handling π
π COPYRIGHT π
Copyright (C) 2021 Intel Corporation. All rights reserved.
π SEE ALSO π
memkind(3)memkind_arena(3)memkind_default(3)memkind_hbw(3)memkind_hugetlb(3)libvmem(3)jemalloc(3)mbind(2)mmap(2)
mwah π that's the whole page. this one came from Intel Corporation, dated 2021-12-08, and it lives in section 3 of the manual β MEMKIND_FIXED(3), periodt. β¨π¦π
π¦ where this page comes from
- debian bookworm: libmemkind-dev 1.14.0-2 Β· BSD-3-Clause
- fedora 43: memkind-devel 1.14.0-11.fc43 Β· BSD-2-Clause
- ubuntu jammy: libmemkind-dev 1.13.0-1 Β· BSD-3-Clause
- ubuntu noble: libmemkind-dev 1.14.0-3build1 Β· BSD-3-Clause
- π the page's license: BSD-2-Clause
- Copyright (C) 2021 Intel Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms