PMEM2_CONFIG_SET_VM_RESERVATION(3)
π pmem2_config_set_vm_reservation() π
okay bestie, welcome to the PMDK Programmer's Manual β section 3, the lil corner where libpmem2 lives. this one's short and sweet, so let's go π«Ά
β¨ NAME β¨
pmem2_config_set_vm_reservation() β sets the pmem2_vm_reservation structure basing on the values in the pmem2_config structure π
like, it literally just takes what's in your config and copies the vibe over to the reservation struct. no cap.
πΈ SYNOPSIS πΈ
#include <libpmem2.h>
struct pmem2_config;
struct pmem2_vm_reservation;
int pmem2_config_set_vm_reservation(struct pmem2_config *config,
struct pmem2_vm_reservation *rsv, size_t rsv_offset);
π¦ DESCRIPTION π¦
so the pmem2_config_set_vm_reservation() function sets the virtual memory reservation and an offset to be used during a mapping. it's giving "here's where you're mapping, and here's exactly where in that space you start" β¨
rsv should be already initialized. please see pmem2_vm_reservation_new(3) for details β don't come at me with an uninitialized reservation, i'm begging π
rsv_offset marks the offset in the reservation for the mapping. like, the lil bookmark saying "start here" π
π RETURN VALUE π
pmem2_config_set_vm_reservation() function always returns 0.
periodt. no error codes, no drama, no surprises. it just works and hands you a 0. iconic behavior honestly π
π SEE ALSO π
π reminder bestie: rsv has to be initialized first, okay? that's the whole plot twist of this page.
that's the whole thing, we ate and left no crumbs π this was PMDK, dated 2025-07-24 β mwah, love u, go map something πβ¨π
π¦ where this page comes from
- fedora 43: libpmem2-devel 2.1.0-4.fc43 Β· BSD-3-Clause
- π the page's license: BSD-3-Clause
- Copyright 2020, Intel Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms