MEMKIND_MEMTIER(3)
π MEMKIND_MEMTIER π
okay bestie, sit DOWN, because we're talking about memkind_memtier(3) β the memory tiering interface, manual page MEMKIND_MEMTIER(3). yes it's giving very "big girl API" and yes you're gonna understand all of it.
heads up, this one's a Note: memkind_memtier.h functionality is considered as stable API (STANDARD API). so like, it's not experimental, it's not going anywhere, it's the real deal. π«Ά
β¨ SYNOPSIS β¨
#include <memkind_memtier.h>
Link with -lmemkind
TIER MANAGEMENT:
struct memtier_builder *memtier_builder_new(memtier_policy_t policy);
void memtier_builder_delete(struct memtier_builder *builder);
int memtier_builder_add_tier(struct memtier_builder *builder, memkind_t kind, unsigned kind_ratio);
struct memtier_memory *memtier_builder_construct_memtier_memory(struct memtier_builder *builder);
void memtier_delete_memtier_memory(struct memtier_memory *memory);
HEAP MANAGEMENT:
void *memtier_malloc(struct memtier_memory *memory, size_t size);
void *memtier_kind_malloc(memkind_t kind, size_t size);
void *memtier_calloc(struct memtier_memory *memory, size_t num, size_t size);
void *memtier_kind_calloc(memkind_t kind, size_t num, size_t size);
void *memtier_realloc(struct memtier_memory *memory, void *ptr, size_t size);
void *memtier_kind_realloc(memkind_t kind, void *ptr, size_t size);
int memtier_posix_memalign(struct memtier_memory *memory, void **memptr, size_t alignment, size_t size);
int memtier_kind_posix_memalign(memkind_t kind, void **memptr, size_t alignment, size_t size);
size_t memtier_usable_size(void *ptr);
void memtier_free(void *ptr);
void memtier_kind_free(memkind_t kind, void *ptr);
size_t memtier_kind_allocated_size(memkind_t kind);
DECORATORS:
void memtier_kind_malloc_post(memkind_t kind, size_t size, void **result);
void memtier_kind_calloc_post(memkind_t kind, size_t nmemb, size_t size, void **result);
void memtier_kind_posix_memalign_post(memkind_t kind, void **memptr, size_t alignment, size_t size, int *err);
void memtier_kind_realloc_post(memkind_t *kind, void *ptr, size_t size, void **result);
void memtier_kind_free_pre(void **ptr);
void memtier_kind_usable_size_post(void **ptr, size_t size);
MEMTIER PROPERTY MANAGEMENT:
int memtier_ctl_set(struct memtier_builder *builder, const char *name, const void *val);
like. look at that. tier management, heap management, decorators, property management. four whole vibes. π
π CTL API π
TODO β no fr, that's what it says. it's a TODO. we love an honest queen. π
here's what's actually supported though, with their types, and yes you need all of these exactly:
Supported names (with type):
policy.dynamic_threshold.thresholds[ID].val(size_t)policy.dynamic_threshold.thresholds[ID].min(size_t)policy.dynamic_threshold.thresholds[ID].max(size_t)policy.dynamic_threshold.check_cnt(unsigned)policy.dynamic_threshold.trigger(float)policy.dynamic_threshold.degree(float)
π¦ DECORATORS π¦
if you want the whole ~lore~ on decorators, go read the DECORATORS section of memkind(3). it's all there, more details than you could ever need, iykyk. π
πΈ DESCRIPTION πΈ
okay so. this section in the original page is... literally empty. nothing. a void. main character silence. π
(not me adding anything here β there's nothing in the source to add, and I'm not about to make things up about a stable API. no cap.)
π COPYRIGHT π
Copyright (C) 2021 Intel Corporation. All rights reserved.
π SEE ALSO π
and that's the whole page, bestie!! β¨ this one came to you from Intel Corporation, dated 2021-03-01, filed under MEMKIND_MEMTIER(3). slay, go allocate something responsibly. ππΈπ¦π
π¦ where this page comes from
- ubuntu jammy: libmemkind-dev 1.13.0-1 Β· 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