aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2019-05-30 16:57:37 +0900
committerKoichi Sasada <ko1@atdot.net>2019-05-30 09:10:17 +0100
commitdd63d7da61c472809c5e6a1dba81b7dea5aa1c1b (patch)
tree542eeb709934d1b8279ac8c731f5378883308674
parente15de865837262122cc64705440d00efac4b8c71 (diff)
downloadruby-dd63d7da61c472809c5e6a1dba81b7dea5aa1c1b.tar.gz
move pinned_bits[] position in struct heap_page.
pinned_bits are not used frequently (only GC.compact use it) so move it at the end of struct heap_page.
-rw-r--r--gc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index d6191ecf68..9a6eaceb56 100644
--- a/gc.c
+++ b/gc.c
@@ -695,14 +695,15 @@ struct heap_page {
#if USE_RGENGC
bits_t wb_unprotected_bits[HEAP_PAGE_BITMAP_LIMIT];
#endif
- /* If set, the object is not movable */
- bits_t pinned_bits[HEAP_PAGE_BITMAP_LIMIT];
/* the following three bitmaps are cleared at the beginning of full GC */
bits_t mark_bits[HEAP_PAGE_BITMAP_LIMIT];
#if USE_RGENGC
bits_t uncollectible_bits[HEAP_PAGE_BITMAP_LIMIT];
bits_t marking_bits[HEAP_PAGE_BITMAP_LIMIT];
#endif
+
+ /* If set, the object is not movable */
+ bits_t pinned_bits[HEAP_PAGE_BITMAP_LIMIT];
};
#define GET_PAGE_BODY(x) ((struct heap_page_body *)((bits_t)(x) & ~(HEAP_PAGE_ALIGN_MASK)))