xpaoom(7)
π xpaoom β bestie, what even happens when XPA runs out of memory?? π
okay so real talk: this is a page from the SAORD Documentation collection, it lives in section 7 of the manual, and it's here to answer one extremely specific, extremely dramatic question. π«Ά
β¨ NAME β¨
Xpaoom β what happens when XPA runs out of memory? π
πΈ SYNOPSIS πΈ
When XPA can't allocate memory, it exits. You can arrange to have it call longjmp() instead. π
π¦ DESCRIPTION π¦
So here's the tea, bestie. When an XPA server or client cannot allocate memory, it will attempt to output an error message and then exit. That's it. That's the whole vibe. Gone. Not coming back. π
If that is not satisfactory β like, say, maybe your program is interactive and can actually recover from OOM errors β you can tell XPA to call longjmp() to go to a recovery branch instead. main character energy fr fr. π
To pass the requisite jmp_buf variable to XPA, make the following call:
XPASaveJmp(void *env);
The value of env is the address of a jmp_buf variable that was previously passed to setjmp(). For example:
jmp_buf env;
...
if( setjmp(jmp_buf) != 0 ){
/* out of memory -- take corrective action, if possible */
} else {
/* save env for XPA */
XPASaveJmp((void *)&jmp_buf);
}
// enter main loop ...
lowkey important: copy that example exactly as it is, bestie β yes, even the setjmp(jmp_buf) bit. we do not "fix" the manpage in this house. π
π SEE ALSO π
See xpa(n) for a list of XPA help pages π
k bye bestie, go forth and handle your memory like a legend πβ¨
this page is xpaoom(7) β version 2.1.15, July 23, 2013 πΈ
π¦ where this page comes from
- debian bookworm: libxpa-dev 2.1.20-1 Β· MIT
- debian trixie: libxpa-dev 2.1.20-3 Β· MIT
- ubuntu jammy: libxpa-dev 2.1.20-1 Β· MIT
- ubuntu noble: libxpa-dev 2.1.20-1build1 Β· MIT
- ubuntu questing: libxpa-dev 2.1.20-3
- ubuntu resolute: libxpa-dev 2.1.20-3build1 Β· MIT
- ubuntu stonking: libxpa-dev 2.1.20-3build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms