Skip to content
Snippets Groups Projects
Commit 45380dbb authored by rtoy's avatar rtoy
Browse files

First cut at GCing static vectors, including static simple-arrays.

This is done by a simple mark-and-sweep GC of the static vectors.
When scavenging the spaces, we mark any static vectors by setting the
MSB of the header word.  After GC is done, an *after-gc-hooks*
function finds all of the static vectors that are not marked and frees
them.  For marked static vectors, we clear the mark bit.

code/array.lisp:
o Add *STATIC-VECTORS* to keep track of all static vectors that have
  been allocated.
o Update MAKE-ARRAY
  - to allow generation of static simple unboxed arrays (1D arrays
    without an array header).
  - Push a weak pointer to the static vector onto *STATIC-VECTORS*
o Add function FREE-STATIC-VECTOR
o Add function FINALIZE-STATIC-VECTORS to free static vectors when
  they are no longer referenced.

lisp/gencgc.c:
o Update scavenge to check for static vectors.  If we find a static
  vector, mark the static vector by setting the MSB of the header
  word.
parent c9b51edb
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment