rpma_mr_get_size(3)

πŸ“¦
version 1.3.0 Β· 3 versions
, in ubuntu noble

πŸ’– rpma_mr_get_size β€” get the size of the local memory region πŸ’–

okay bestie, this one is short and sweet, it's giving little snack, and it's from the RPMA Programmer's Manual (that's the librpma crew, iykyk). literally the whole job of this function is: you hand it a memory region, it tells you how big it is. that's it. that's the vibe. periodt. ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <librpma.h>

struct rpma_mr_local;
int rpma_mr_get_size(const struct rpma_mr_local *mr, size_t *size);

🌸 DESCRIPTION 🌸

so like, rpma_mr_get_size() pulls the size of a memory region out of your local memory registration object. you pass in the mr, it drops the number into size. no cap, that's the entire plot. πŸ¦‹


✨ RETURN VALUE ✨

  • returns 0 when it goes off without a hitch β€” slay πŸ’…
  • returns a negative error code when it fails β€” not slay 😭
and listen: on failure, rpma_mr_get_size() does not set the *size value. so don't be out here reading *size like it means something when the call flopped, bestie. it does not. πŸ™ˆ

πŸ’€ ERRORS πŸ’€

rpma_mr_get_size() can fail with exactly this one:

  • RPMA_E_INVAL β€” mr or size is NULL. yeah, you handed it a whole nothing where a thing should be. iconic but wrong. πŸ‘‘

🫢 SEE ALSO 🫢


that's the whole page, no filler, main character energy from start to finish 🌈⭐ and real quick, the fine print cuties: this is RPMA, dated 01 April 2024, and we are so done here πŸ’œπŸ§šπŸ“

πŸ“¦ where this page comes from