Use bitmap_scan() when layout->bitmap is a bignum
commit7fa52adfeccf9a28fad059b482fae5b6fdee7eca
authorDouglas Katzman <dougk@google.com>
Mon, 12 Sep 2016 20:36:01 +0000 (12 16:36 -0400)
committerDouglas Katzman <dougk@google.com>
Mon, 12 Sep 2016 21:27:09 +0000 (12 17:27 -0400)
tree95d613e9c35911d7f9804116b3083ba1b5d196c7
parent871b529c243d243cfe2d91aacba9ed8df5ab213e
Use bitmap_scan() when layout->bitmap is a bignum

Though bitmap_scan expects to deal with a range of memory whose size is a
multiple of N_WORD_BITS, it never accesses memory not indicated by a 1 bit
in the bitmap. Therefore this works agnostically of layout->length.

Aside from the improved algorithm, we only need to check for a forwarded
bignum once per scavenged object, not once per slot per object.
src/runtime/gc-common.c