code/room: Completely rewrite MAP-ALLOCATED-OBJECTS.
authorAlastair Bridgewater <nyef@kana.lisphacker.com>
Tue, 30 Apr 2013 02:56:14 +0000 (22:56 -0400)
committerAlastair Bridgewater <nyef@kana.lisphacker.com>
Sat, 11 May 2013 14:00:56 +0000 (10:00 -0400)
commit24ecee137a93b3f769d1aa04589a5c9b0e76ea66
treefa108cb33bf1c9199533bbebff023127076ca05c
parent4c86741fbb42b15472c3e4b615935159566427d9
code/room: Completely rewrite MAP-ALLOCATED-OBJECTS.

  * The old version of M-A-O consisted of bizaare toplevel logic,
a scheme for figuring out what each heap object was and its size
that did not parallel what the garbage collector used and may or
may not have been correct, and relied heavily on inlining to
reduce consing.

  * This new version of M-A-O uses straightforward toplevel logic,
a scheme for figuring out what each heap object is and its size
that directly parallels what the garbage collector uses and is
verifiably correct, and relies heavily on the aligned unboxed
pointer to fixnum equivalence to reduce consing.

  * The new interface to M-A-O no longer includes the optional
"careful" argument, as it gains us nothing once the underlying
mechanism is so obviously correct.  sb-introspect has been updated
appropriately.

  * The way the new implementation walks the heap and page table
requires direct access to a "static" global variable in gencgc.c,
so the "static" attribute has been removed.

  * This implementation has been lightly tested on an x86-64 and
PPC, and it seems to work quite well, but there are still some
fairly obvious non-optimalities in terms of generated code (as
seen in the trace-file output from the cross compiler).  It does
pass the two test cases that exhausted the heap on PPC with the
previous implementation.
NEWS
contrib/sb-introspect/introspect.lisp
src/code/room.lisp
src/runtime/gencgc.c