LIBXO(3)
π LIBXO(3) β Library Functions Manual
okay bestie, gather round, because today we're talking about libxo(3) β yes, that libxo β and specifically one lil' function that lets it vibe in places where the usual memory crew can't show up. π«Ά
β¨ NAME β¨
xo_set_allocator β set allocation functions for libxo
π LIBRARY π
library βlibxoβ
π SYNOPSIS π
#include <libxo/xo.h>
typedef void *(*xo_realloc_func_t)(void *, size_t);
typedef void (*xo_free_func_t)(void *);
void
xo_set_allocator(xo_realloc_func_t realloc_func,
xo_free_func_t free_func);
πΈ DESCRIPTION πΈ
so like. xo_set_allocator() is the function that lets libxo exist in environments where the standard realloc(3) and free(3) functions simply are not available. imagine showing up to a party and the DJ isn't there β you gotta bring your own, fr fr. π§
realloc_func should expect the same arguments as realloc(3) and return a pointer to memory following the same convention. no cap, same energy.
free_func will receive the same argument as free(3) and should release it, as appropriate for the environment. do your thing, bestie, just make sure it's actually your thing. π
By default, the standard realloc(3) and free(3) functions are used. so if you don't call this, everything just... works. iconic behavior honestly. β¨
π SEE ALSO π
π HISTORY π
The libxo library first appeared in FreeBSD 11.0. a whole era. π¦
π AUTHORS π
libxo was written by Phil Shafer <phil@freebsd.org>. we stan. π
π ADDITIONAL DOCUMENTATION π
FreeBSD uses libxo version 1.7.5. Complete documentation can be found on github:
https://juniper.github.io/libxo/1.7.5/html/index.html
libxo lives on github as:
https://github.com/Juniper/libxo
The latest release of libxo is available at:
https://github.com/Juniper/libxo/releases
π HISTORY π
The libxo library was added in FreeBSD 11.0. (yes, this section said basically the same thing earlier β the manpage said it twice so we're saying it twice. consistency queen. π)
βοΈ AUTHOR βοΈ
Phil Shafer
quick vibe check bestie: if you're not in a weird embedded-ish environment with norealloc(3)/free(3), you probably don't need to touch this at all. the defaults are defaulting. leave them be. π
and that's the whole page, fr fr β this was libxo(3) from the Debian crew, dated December 4, 2014. mwah, go forth and allocate responsibly. ππ§
π¦ where this page comes from
- epel 9: libxo-devel 1.7.5-1.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: libxo-devel 1.7.5-2.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: libxo-devel 1.7.5-2.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: libxo-devel 1.7.5-3.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: libxo-devel 1.7.5-3.fc44 Β· LicenseRef-Callaway-BSD
- nixpkgs unstable: libxo 1.7.5
- Copyright (c) 2014, Juniper Networks, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms