read_allocate(3)
π read_allocate β bestie edition π
okay so this is from the Staden Package manual, section 3, and it's literally about the read_allocate(3) and read_deallocate(3) girlies. they're a package deal, fr fr. let's get into it π«Ά
β¨ NAME β¨
read_allocate, read_deallocate β allocate and deallocate the Read structure. yes that's the whole job, and they ate π
πΈ SYNOPSIS πΈ
#include <Read.h>
Read *read_allocate(
int num_points,
int num_bases);
void read_deallocate(
Read *read);
π¦ DESCRIPTION π¦
so these two functions are the ones that create and destroy Read structures. and what even is a Read structure? it's a generalised in-memory data structure used for holding trace data information. iconic behaviour, no cap β¨
read_allocate() makes you a Read structure that's big enough to hold num_points trace sample points and num_bases called bases. then all that allocated data gets initialised to appropriate defaults β which are mainly zeros and null pointers. clean slate energy π§Ό
read_deallocate() destroys a Read structure you made earlier. and bestie, listen β it is not sufficient to simply use the free() call instead. do not do that. use the actual deallocator. it's giving "there's a right way and a wrong way" π
π RETURN VALUES π
- when
read_allocate()finishes successfully, it returns a pointer to aReadstructure. otherwise? this function returns a null pointer. so like, check it π read_deallocate()returns no value. it'svoid, she gives nothing back, she just does her job π
π SEE ALSO π
go read those too, the whole squad is worth your time π
mwah, that's the page! this one came from the Staden Package and it's the read_allocate(3) manual page, so if you ever need to cite your sources, that's the vibe. love u, bye π¦πβ
π¦ where this page comes from
- debian bookworm: libstaden-read-dev 1.14.15-1 Β· GRL OR MRC
- debian trixie: libstaden-read-dev 1.15.0-1.1+b2 Β· GRL OR MRC
- fedora 43: staden-io_lib-devel 1.14.8-6.fc43 Β· MIT
- fedora 43: staden-io_lib-devel 1.14.8-6.fc43 Β· MIT
- fedora 44: staden-io_lib-devel 1.14.8-7.fc44 Β· MIT
- fedora 44: staden-io_lib-devel 1.14.8-7.fc44 Β· MIT
- nixos 26.05: libstaden-read 1-15-1
- nixpkgs unstable: libstaden-read 1-15-1
- ubuntu jammy: libstaden-read-dev 1.14.14+dfsg-1 Β· GRL OR MRC
- ubuntu noble: libstaden-read-dev 1.15.0-1.1build2 Β· GRL OR MRC
- ubuntu questing: libstaden-read-dev 1.15.0-1.1build2
- ubuntu resolute: libstaden-read-dev 1.15.0-1.1build3 Β· GRL OR MRC
- ubuntu stonking: libstaden-read-dev 1.15.1-1 Β· GRL OR MRC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms