RPMA_MR_GET_DESCRIPTOR_SIZE(3)

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

πŸ’– rpma_mr_get_descriptor_size(3) πŸ’–

okay so bestie, welcome to the RPMA Programmer's Manual ✨ this one's a lil baby page but it's important, i promise. it's giving "short but essential" and honestly? we love that for us. 🫢


🌸 NAME 🌸

rpma_mr_get_descriptor_size β€” get the size of the memory region descriptor, that's it, that's the whole job πŸ’…


✨ SYNOPSIS ✨

#include <librpma.h>

struct rpma_mr_local;
int rpma_mr_get_descriptor_size(const struct rpma_mr_local *mr, size_t *desc_size);

like yes, that's the whole thing. two lines of actual code. iconic behaviour, no notes. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so rpma_mr_get_descriptor_size() does exactly one thing and it does it well: it gets the size of the memory region descriptor. that's the vibe. that's the assignment. it ate and left no crumbs. 🌈

no cap, that's genuinely it β€” you hand it a memory region, it tells you how big the descriptor for that memory region is. main character energy for a function that literally just reports a number. ⭐


πŸ’œ RETURN VALUE πŸ’œ

  • on success? rpma_mr_get_descriptor_size() returns 0. slay. βœ…
  • on failure? it returns a negative error code. 😭
  • and this is the important part bestie, listen: on failure it does not set the *desc_size value. like, at all. so don't go reading that variable expecting truth, because you will get played. πŸ’€
fr fr, if this function fails, *desc_size is not yours to trust. guard your heart (and your pointers).

πŸŽ€ ERRORS πŸŽ€

rpma_mr_get_descriptor_size() can fail with the following error:

  • RPMA_E_INVAL β€” mr or desc_size is NULL. yeah. you gotta actually give it real things to work with, bestie. passing NULL is not the moment. πŸ™ˆ

🌟 SEE ALSO 🌟


okay bye ily, this page is from the RPMA era, dated 01 April 2024 πŸ’– go forth and get those descriptor sizes, bestie β€” you're gonna do amazing πŸŽ€βœ¨πŸŒΈ

πŸ“¦ where this page comes from