diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-10-17 15:27:21 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-10-17 15:27:21 (GMT) |
commit | 912e82088edadbdbf95d594f93ddc9dd99a305f8 (patch) | |
tree | 9153dcd3bcf256fb26ebdcbfd8a1a7d9132430f1 /xpa/doc/oom.html | |
parent | fecf4a80a5080aa65e7c2d717f96e86ad04ca46c (diff) | |
parent | d604b7940b14efb191a38ef22c3a38fa3adba4d0 (diff) | |
download | blt-912e82088edadbdbf95d594f93ddc9dd99a305f8.zip blt-912e82088edadbdbf95d594f93ddc9dd99a305f8.tar.gz blt-912e82088edadbdbf95d594f93ddc9dd99a305f8.tar.bz2 |
Merge commit 'd604b7940b14efb191a38ef22c3a38fa3adba4d0' as 'xpa'
Diffstat (limited to 'xpa/doc/oom.html')
-rw-r--r-- | xpa/doc/oom.html | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/xpa/doc/oom.html b/xpa/doc/oom.html new file mode 100644 index 0000000..360740e --- /dev/null +++ b/xpa/doc/oom.html @@ -0,0 +1,52 @@ +<!-- =defdoc xpaoom xpaoom n --> +<HTML> +<HEAD> +<TITLE>Out of Memory</TITLE> +</HEAD> +<BODY> + +<!-- =section xpaoom NAME --> +<H2><A NAME="xpaoom">Xpaoom: What happens when XPA runs out of memory?</A></H2> + +<!-- =section xpaoom SYNOPSIS --> +<H2>Summary</H2> +<P> +When XPA can't allocate memory, it exits. You can arrange to have it call +longjmp() instead. + +<!-- =section xpaoom DESCRIPTION --> +<H2>Description</H2> +<P> +When an XPA server or client cannot allocate memory, it will attempt to +output an error message and then exit. If this is not satisfactory (e.g., +perhaps your program is interactive and can recover from OOM errors), you +can tell XPA to call longjmp() to go to a recovery branch. To pass the +requisite jmp_buf variable to XPA, make the following call: +<PRE> + XPASaveJmp(void *env); +</PRE> +The value of env is the address of a jmp_buf variable that was previously +passed to setjmp(). For example: +<PRE> + 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 ... +</PRE> + +<!-- =section xpaoom SEE ALSO --> +<!-- =text See xpa(n) for a list of XPA help pages --> +<!-- =stop --> + +<P> +<A HREF="./help.html">Go to XPA Help Index</A> + +<H5>Last updated: April 7, 2009</H5> +</BODY> +</HTML> + |