The function make-permanent-simple-vector
creates a simple-vector
of length size with initial element initial-element as if by the call (make-array
size :initial-element
initial-element)
, except that it is allocated as a permanent object when possible.
When not in the Mobile GC, simple-vector is allocated in the highest generation number.
In the Mobile GC, if size is larger than (ash 1 17)
(#x20000, 131072), so simple-vector is allocated in its own segment, it is made permanent. Otherwise it is allocated n generation 2.
make-permanent-simple-vector
is intended mainly for allocating large simple-vector
objects in the Mobile GC (that is, those that can be made permanent). When not in the Mobile GC, it does not do anything that make-array cannot do, but it may be convenient sometimes.
Note that, except for large simple-vector
objects in the Mobile GC, simple-vector is not actually permanent, and a GC of the highest generation will scan it (or free it if nothing point to it).
When simple-vector is permanent, and you do not need it any more, then you need to release it by release-object-and-nullify.
In the Mobile GC with large vectors, if initial-element is not supplied or it is an immediate or a permanent object, make-permanent-simple-vector
is much better than using make-object-permanent after a call to make-array, because it knows that it does not contain pointers to a lower generation.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4