emacs.d/clones/www.sbcl.org/sbcl-internals/Overview.html
2023-01-18 20:30:47 +01:00

58 lines
2.4 KiB
HTML

<html lang="en">
<head>
<title>Overview - SBCL Internals</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="SBCL Internals">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Specials.html#Specials" title="Specials">
<link rel="next" href="Binding-and-unbinding.html#Binding-and-unbinding" title="Binding and unbinding">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual is part of the SBCL software system. See the `README'
file for more information.
This manual is in the public domain and is provided with
absolutely no warranty. See the `COPYING' and `CREDITS' files for
more information.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Overview"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Binding-and-unbinding.html#Binding-and-unbinding">Binding and unbinding</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Specials.html#Specials">Specials</a>
<hr>
</div>
<h3 class="section">8.1 Overview</h3>
<p>Unithread SBCL uses a shallow binding scheme: the current value of a
symbol is stored directly in its value slot. Accessing specials is
pretty fast but it's still a lot slower than accessing lexicals.
<p>With multithreading it's slightly more complicated. The symbol's value
slot contains the global value and each symbol has a <code>TLS-INDEX</code>
slot that - when it's first bound - is set to a unique index of the
thread local area reserved for this purpose. The tls index is
initially zero and at index zero in the tls <code>NO-TLS-VALUE-MARKER</code>
resides. <code>NO-TLS-VALUE-MARKER</code> is different from
<code>UNBOUND-MARKER</code> to allow <code>PROGV</code> to bind a special to no
value locally in a thread.
</body></html>