UMAD_ALLOC(3)
β¨ UMAD_ALLOC β allocate memory for umad buffers β¨
okay bestie, welcome to the umad_alloc(3) page from the OpenIB Programmer's Manual π this one's short and sweet, but it's lowkey important, so let's get into it π«Ά
πΈ SYNOPSIS πΈ
#include <infiniband/umad.h>
void * umad_alloc(int num, size_t size);
π DESCRIPTION π
so like, umad_alloc() does exactly what it says on the tin: it allocates memory for an array of num umad buffers, each one size bytes big π
but here's the part you actually need to clock, bestie β size is NOT just the payload size. it has to include umad_size() plus the length. and that length is:
MAD_BLOCK_SIZEfor your normal, regular-degular MADs π- the length that
umad_recv()handed back to you, if you're dealing with RMPP MADs π¦
so basically: don't just pass the data length and call it a day. add the umad_size() on top or it's giving "why is my buffer broken" energy π
π RETURN VALUE π
umad_alloc() returns NULL if it's out of memory. that's the whole thing. no fancy error codes, no secrets, just NULL. so likeβ¦ check for it, okay? π
π SEE ALSO π
umad_free(3)β yes queen, you gotta free what you allocate, we don't do leaks in this house π
β AUTHOR β
Hal Rosenstock <halr@voltaire.com> β iconic behavior, we love a legend π«Ά
and that's the whole vibe, bestie β¨ this little page came to you from the OpenIB crew, dated May 21, 2007, and it lives in the UMAD_ALLOC(3) section of the manual. go forth and allocate responsibly ππΈπ
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- arch rolling: rdma-core 65.0-1 Β· GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-MIT AND GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-FreeBSD AND GPL-2.0-or-later OR LicenseRef-Intel-BSD-3-Clause AND GPL-2.0-or-later OR LicenseRef-PathScale-BSD-Patent-License AND CC0-1.0 AND MIT AND BSD-2-Clause AND CPL-1.0 OR BSD-2-Clause OR GPL-2.0-or-later
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- debian bookworm: libibumad-dev 44.0-2 Β· BSD-MIT OR GPL-2.0-only
- debian trixie: libibumad-dev 56.1-1 Β· BSD-MIT OR GPL-2.0-only
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 43: rdma-core-devel 58.0-4.fc43 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.0-2.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- fedora 44: rdma-core-devel 61.1^20260812git975bdaf-1.fc44 Β· GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
- nixos 26.05: rdma-core 62.0
- nixpkgs unstable: rdma-core 65.0
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- opensuse-leap 16.0: rdma-core-devel 56.1-160000.2.2 Β· BSD-2-Clause OR GPL-2.0-only
- ubuntu jammy: libibumad-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: libibumad-dev 50.0-2build2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu noble: libibumad-dev 50.0-2ubuntu0.2 Β· BSD-MIT OR GPL-2.0-only
- ubuntu questing: libibumad-dev 56.1-1ubuntu1
- ubuntu resolute: libibumad-dev 61.0-2ubuntu3 Β· BSD-MIT OR GPL-2.0-only
- ubuntu stonking: libibumad-dev 64.0-1ubuntu1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms