CK_BITMAP_SIZE(3)
π NAME π
ok so bestie, ck_bitmap_size β she tells you how many bytes you actually need for your bitmap. that's it, that's the whole job. returns necessary number of bytes for bitmap. slay.
π LIBRARY π
this one lives in the Concurrency Kit, aka libck, and you link it with -lck. iykyk π
β¨ SYNOPSIS β¨
#include <ck_bitmap.h>
unsigned int
ck_bitmap_size(unsigned int n_bits);
that's the whole vibe. include the header, call the function, boom. π
πΈ DESCRIPTION πΈ
ok so here's the tea: ck_bitmap_size() returns the number of bytes you need to allocate for a bitmap that's gonna hold the number of bits you specify in n_bits. it's literally just doing the math for you, bestie, so you don't have to.
when you're making bitmap objects dynamically β like, at runtime, with malloc energy β this is the function you call to figure out how many bytes to grab. π§
but listen: the object you allocate still has to be initialized with ck_bitmap_init(3). allocating it is NOT the same as initializing it. do both. no shortcuts. periodt. π₯
don't skip the init step, bestie, i'm begging π
π RETURN VALUES π
this function returns a non-zero value. yes, always non-zero. no cap.
π¦ SEE ALSO π¦
the whole friend group, in order:
ck_bitmap_base(3)ck_bitmap_init(3)ck_bitmap_set_mpmc(3)ck_bitmap_reset_mpmc(3)ck_bitmap_test(3)ck_bitmap_clear(3)ck_bitmap_bits(3)ck_bitmap_buffer(3)
and if you want even more lore, it's all sitting at http://concurrencykit.org/ π
k bye bestie, this page is from way back on April 22, 2012, and it's page CK_BITMAP_SIZE(3) β go allocate something iconic πβ¨
π¦ where this page comes from
- alpine 3.24: ck-doc 0.7.2-r1 Β· BSD-2-Clause AND Apache-2.0
- debian bookworm: libck-dev 0.7.1-10 Β· BSD-2-Clause
- debian trixie: libck-dev 0.7.2-6 Β· BSD-2-Clause
- epel 10: ck-devel 0.7.2-1.el10_1 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- epel 9: ck-devel 0.7.0-10.el9 Β· BSD
- fedora 43: ck-devel 0.7.2-2.fc43 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 43: ck-devel 0.7.2-2.fc43 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 44: ck-devel 0.7.2-4.fc44 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- fedora 44: ck-devel 0.7.2-4.fc44 Β· BSD-2-clause AND Apache-2.0 AND BSD-3-clause
- nixos 26.05: ck 0.7.2
- nixpkgs unstable: ck 0.7.2
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- opensuse-leap 16.0: ck-devel 0.7.2-bp160.1.9 Β· Apache-2.0 AND BSD-2-Clause
- ubuntu jammy: libck-dev 0.7.1-6ubuntu2 Β· BSD-2-Clause
- ubuntu noble: libck-dev 0.7.1-13build1 Β· BSD-2-Clause
- ubuntu questing: libck-dev 0.7.2-5ubuntu1
- ubuntu resolute: libck-dev 0.7.2-5ubuntu2 Β· BSD-2-Clause
- ubuntu stonking: libck-dev 0.7.2-11 Β· BSD-2-Clause
- Copyright 2012-2013 Samy Al Bahra
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms