Add :segregated-code feature for gencgc.
commitd4bf54c6bdd4dde21753e31dd522d52b551f7c95
authorDouglas Katzman <dougk@google.com>
Tue, 2 May 2017 15:42:15 +0000 (2 11:42 -0400)
committerDouglas Katzman <dougk@google.com>
Tue, 2 May 2017 15:51:58 +0000 (2 11:51 -0400)
tree1d1f3c254b3eef47f70a0dc1e26fdc4d4d42c874
parent1b4526c88542a73e7399979491e89e7e71032638
Add :segregated-code feature for gencgc.

If enabled, a code object will never coexist on a page with non-code.
This will allow a nice improvement to conservative_root_p(), because
if a page can't contain code, then any non-lisp-pointer that looks at
the page is instantly ruled out as a potential conservative root.

This brings about a new problem though: fragmentation is excessive
because small object pages are difficult to fill with strictly code.
The waste is as much as 20%. I'd like to solve that issue before removing
the logic for non-segregation.  The trick will be to try hard to fill in
partial pages at indices less than the code region alloc start page.
Alternatively, it might be enough to implement a defrag algorithm
for dynamic-space code at SAVE-LISP-AND-DIE time.
src/code/room.lisp
src/runtime/gc-internal.h
src/runtime/gencgc-alloc-region.h
src/runtime/gencgc.c