0.6.7.22: removed CVS dollar-Header-dollar tags from sources
[sbcl.git] / src / pcl / precom1.lisp
1 ;;;; This software is part of the SBCL system. See the README file for
2 ;;;; more information.
3
4 ;;;; This software is derived from software originally released by Xerox
5 ;;;; Corporation. Copyright and release statements follow. Later modifications
6 ;;;; to the software are in the public domain and are provided with
7 ;;;; absolutely no warranty. See the COPYING and CREDITS files for more
8 ;;;; information.
9
10 ;;;; copyright information from original PCL sources:
11 ;;;;
12 ;;;; Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 Xerox Corporation.
13 ;;;; All rights reserved.
14 ;;;;
15 ;;;; Use and copying of this software and preparation of derivative works based
16 ;;;; upon this software are permitted. Any distribution of this software or
17 ;;;; derivative works must comply with all applicable United States export
18 ;;;; control laws.
19 ;;;;
20 ;;;; This software is made available AS IS, and Xerox Corporation makes no
21 ;;;; warranty about the software, its performance or its conformity to any
22 ;;;; specification.
23
24 (in-package "SB-PCL")
25 \f
26 ;;; Pre-allocate generic function caches. The hope is that this will put
27 ;;; them nicely together in memory, and that that may be a win. Of course
28 ;;; the first gc copy will probably blow that out, this really wants to be
29 ;;; wrapped in something that declares the area static.
30 ;;;
31 ;;; This preallocation only creates about 25% more caches than PCL itself
32 ;;; uses need. Some ports may want to preallocate some more of these.
33 (flet ((allocate (n size)
34                  (mapcar #'free-cache-vector
35                          (mapcar #'get-cache-vector
36                                  (make-list n :initial-element size)))))
37   (allocate 128 4)
38   (allocate 64 8)
39   (allocate 64 9)
40   (allocate 32 16)
41   (allocate 16 17)
42   (allocate 16 32)
43   (allocate 1  64))