MEMKIND_MEMTIER(3)

NAME
memkind_memtier - memory tiering interface
Note: memkind_memtier.h functionality is considered as stable API (STANDARD API).

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);

CTL API
TODO
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
See section DECORATORS of memkind(3) for more details about decorators.

DESCRIPTION

COPYRIGHT
Copyright (C) 2021 Intel Corporation. All rights reserved.

SEE ALSO
memkind(3)