PMEM2_MAP_GET_ADDRESS(3)

✨ pmem2_map_get_address() ✨

okay bestie, so this one lives in the PMDK Programmer's Manual and honestly? it's a little baby function that does exactly one thing and does it flawlessly. no notes. πŸ’…


🌸 NAME 🌸

pmem2_map_get_address() β€” reads mapping address 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <libpmem2.h>

void *pmem2_map_get_address(struct pmem2_map *map);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, the pmem2_map_get_address() function reads the address of the created mapping. that's it. that's the whole job. she's an icon, she's a legend, and she is not doing anything else today. πŸ‘‘

the map parameter points to the structure describing a mapping that was created using the pmem2_map_new(3) function. so basically: you already did the whole mapping thing with pmem2_map_new(3), and now you're just asking "hey girl, where did you put it?" and she tells you. periodt. ✨

ngl if you hand her a map that didn't come from pmem2_map_new(3), that's on you. she's reading what you gave her, no vibe check included. 😭

πŸ’– RETURN VALUE πŸ’–

the pmem2_map_get_address() function returns a pointer to the mapped area. that's the address, bestie. that's the whole tea. πŸ“


🌈 SEE ALSO 🌈


and that's the whole page, no cap. this was PMDK, dated 2025-07-24 β€” mwah, iconic, obsessed, bye bestie πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from