gencgc: Decide earlier about pinning large object pages.
authorAlastair Bridgewater <alastair.bridgewater@gmail.com>
Sun, 19 May 2013 17:00:52 +0000 (13:00 -0400)
committerAlastair Bridgewater <nyef@kana.lisphacker.com>
Mon, 20 May 2013 19:51:22 +0000 (15:51 -0400)
commitc6aa07913db78733634b49d305f41bb8ae4f97e2
tree21a263a1e6e0c23d0b62bf8e7769ba33fbe8ce60
parent4438080fb2f654d99c265252963fcea6266b4d40
gencgc: Decide earlier about pinning large object pages.

  * The old logic here called maybe_adjust_large_object(), and
then re-checked the pointer to preserve for validity.  This is
non-optimal, as it means that maybe_adjust_large_object can't
promote pages to newspace directly, it instead merely adjusts the
page allocation to fit the possibly-shrunken object.

  * It turns out that large_object pages can contain bignums,
vectors, code-objects, or in unusual cases instances.  Neither
bignums, vectors, nor instances can contain embedded objects.
Code-objects can contain only functions or LRAs.  None of these
objects have list-pointer-lowtag on their references.  The "tail"
of a shrunken object is comprised of conses with both cells as
fixnum zero.  The minor catch is that we allow untagged pointers
to pin code-allocated pages, but the saving grace here is that
code-objects don't shrink.

  * Alter preserve_pointer() to test the lowtag and page type to
check for invalid pointers to large-object pages before calling
maybe_adjust_large_object() instead of bounds-checking the pointer
after the fact.
src/runtime/gencgc.c