0.7.1.23:
[sbcl.git] / src / code / exhaust.lisp
1 ;;;; detecting and handling exhaustion of memory (stack or heap)
2
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
11
12 (in-package "SB!KERNEL")
13
14 ;;; FIXME: Even though this is only called when (> SAFETY (MAX SPEED SPACE))
15 ;;; it's still annoyingly wasteful for it to be a full function call.
16 ;;; It should probably be a VOP calling an assembly routine or something
17 ;;; like that.
18 (defun %detect-stack-exhaustion ()
19   ;; FIXME: Check the stack pointer against *STACK-EXHAUSTION*, and if
20   ;; out of range signal an error (in a context where *S-E* has been
21   ;; rebound to give some space to let error handling code do its
22   ;; thing without new exhaustion problems).
23   (values))