Memory Abuse With SBCL
Here is a fun and pointless experiment performed on my web server which is running Debian/Sarge:
david@apostrophe:~ $ time sbcl --eval '(loop for i from 1 collect i)' This is SBCL 0.9.6, an implementation of ANSI Common Lisp. More information about SBCL is available at <http://www.sbcl.org/>. SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information. ; in: LAMBDA NIL ; (RETURN-FROM NIL (SB-LOOP::LOOP-COLLECT-ANSWER #:LOOP-LIST-HEAD-3765)) ; ; note: deleting unreachable code ; ; compilation unit finished ; printed 1 note Argh! gc_find_free_space failed (first_page), nbytes=8. Gen Boxed Unboxed LB LUB !move Alloc Waste Trig WP GCs Mem-age 0: 0 0 0 0 0 0 0 2000000 0 0 0.0000 1: 0 0 0 0 0 0 0 2000000 0 0 0.0000 2: 89166 1 0 0 0 365216760 11272 2000000 0 0 0.9655 3: 0 0 0 0 0 0 0 2000000 0 0 0.0000 4: 0 0 0 0 0 0 0 2000000 0 0 0.0000 5: 0 0 0 0 0 0 0 2000000 0 0 0.0000 6: 6441 0 0 0 0 26382336 0 2000000 6395 0 0.0000 Total bytes allocated=536847680 fatal error encountered in SBCL pid 23150(tid 3085394048) The system is too badly corrupted or confused to continue at the Lisp level. If the system had been compiled with the SB-LDB feature, we'd drop into the LDB low-level debugger now. But there's no LDB in this build, so we can't really do anything but just exit, sorry. real 4m7.355s user 0m43.441s sys 0m25.635s
Now I know how SBCL reacts when it runs out of memory.