6724c66c65b6dbc97c54d9928ed6d9730a059ab8
[sbcl.git] / src / code / exhaust.lisp
1 ;;;; detecting and handling exhaustion of fundamental system resources
2 ;;;; (stack or heap)
3
4 ;;;; This software is part of the SBCL system. See the README file for
5 ;;;; more information.
6 ;;;;
7 ;;;; This software is derived from the CMU CL system, which was
8 ;;;; written at Carnegie Mellon University and released into the
9 ;;;; public domain. The software is in the public domain and is
10 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
11 ;;;; files for more information.
12
13 (in-package "SB!KERNEL")
14 (define-alien-routine ("protect_control_stack_guard_page"
15                        %protect-control-stack-guard-page)
16     sb!alien:void
17   (thread-id #!+sb-thread sb!alien:unsigned-long
18              #!-sb-thread sb!alien:int)
19   (protect-p sb!alien:int))
20 (defun protect-control-stack-guard-page (n)
21   (%protect-control-stack-guard-page 
22    (sb!thread:current-thread-id) (if n 1 0)))
23
24