1 ;;;; This software is part of the SBCL system. See the README file for
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
10 ;;;; copyright information from original PCL sources:
12 ;;;; Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 Xerox Corporation.
13 ;;;; All rights reserved.
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
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
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.
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)))))