Skip to content

Commit

Permalink
move pinned_bits[] position in struct heap_page.
Browse files Browse the repository at this point in the history
pinned_bits are not used frequently (only GC.compact use it) so
move it at the end of struct heap_page.
  • Loading branch information
ko1 committed May 30, 2019
1 parent e15de86 commit dd63d7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gc.c
Expand Up @@ -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)))
Expand Down

0 comments on commit dd63d7d

Please sign in to comment.