qpool_create(3)
π¦ NAME π¦
okay bestie, gather round, because this page is all about qpool_create β it allocates a distributed memory pool β¨. that's the whole job. she's a builder, she sets up the vibe, and she hands you back a pool. periodt.
π SYNOPSIS π
so like, first you gotta pull in the header, obviously:
#include <qthread/qpool.h>
and then here's the two glow-ups she comes in:
qpool *
qpool_create (const size_t item_size);
qpool *
qpool_create_aligned (const size_t item_size, const size_t alignment);
two icons, one family. pick your fighter π«Ά
π DESCRIPTION π
okay so these functions initialize qpool distributed memory pools. that's the whole mission statement, no cap. you call one, it spins you up a pool, you go live your life π.
and then there's qpool_create_aligned(), which is the extra one of the two. the way that she works is she lets you specify the alignment β so every single allocated element will align along specific alignment boundaries. very particular, very demure, she knows what she wants π
.
one lil thing you gotta respect: the alignment value is expected to be a power of two. that's not a suggestion bestie, that's the assignment. give her a power of two and she's happy πΈ.
no drama here, just: header in, pool out, alignment on fleek if you want it. slay.
π SEE ALSO π
qpool_destroy(3)β the breakup arc πqpool_alloc(3)β where you actually get your stuff πqpool_free(3)β giving it back, we love a responsible queen π
and that's the whole page, bestie, you ate π«Ά this lil gem is from the libqthread manual and it's been sitting pretty since MAY 2009 β no notes, iconic behavior, go make some pools πβ¨
π¦ where this page comes from
- fedora 43: qthreads-devel 1.22^20251007gitcedb1fc-1.fc43 Β· BSD-3-Clause AND MIT AND dtoa
- fedora 44: qthreads-devel 1.22^20251007gitcedb1fc-2.fc44 Β· BSD-3-Clause AND MIT AND dtoa
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms