1xpaoom(n) SAORD Documentation xpaoom(n)
2
3
4
6 Xpaoom: What happens when XPA runs out of memory?
7
9 When XPA can't allocate memory, it exits. You can arrange to have it
10 call longjmp() instead.
11
13 When an XPA server or client cannot allocate memory, it will attempt to
14 output an error message and then exit. If this is not satisfactory
15 (e.g., perhaps your program is interactive and can recover from OOM
16 errors), you can tell XPA to call longjmp() to go to a recovery branch.
17 To pass the requisite jmp_buf variable to XPA, make the following call:
18
19 XPASaveJmp(void *env);
20
21 The value of env is the address of a jmp_buf variable that was
22 previously passed to setjmp(). For example:
23
24 jmp_buf env;
25 ...
26 if( setjmp(jmp_buf) != 0 ){
27 /* out of memory -- take corrective action, if possible */
28 } else {
29 /* save env for XPA */
30 XPASaveJmp((void *)&jmp_buf);
31 }
32 // enter main loop ...
33
35 See xpa(n) for a list of XPA help pages
36
37
38
39version 2.1.15 July 23, 2013 xpaoom(n)