diff --git a/js/public/HeapAPI.h b/js/public/HeapAPI.h index 473ef8414bbe..71da9e7a4d38 100644 --- a/js/public/HeapAPI.h +++ b/js/public/HeapAPI.h @@ -42,6 +42,14 @@ const size_t CellAlignMask = CellAlignBytes - 1; const size_t CellBytesPerMarkBit = CellAlignBytes; +/* + * We sometimes use an index to refer to a cell in an arena. The index for a + * cell is found by dividing by the cell alignment so not all indicies refer to + * valid cells. + */ +const size_t ArenaCellIndexBytes = CellAlignBytes; +const size_t MaxArenaCellIndex = ArenaSize / CellAlignBytes; + /* These are magic constants derived from actual offsets in gc/Heap.h. */ #ifdef JS_GC_SMALL_CHUNK_SIZE const size_t ChunkMarkBitmapOffset = 258104; diff --git a/js/src/gc/Heap.h b/js/src/gc/Heap.h index 8272e4364dff..85cb733102f7 100644 --- a/js/src/gc/Heap.h +++ b/js/src/gc/Heap.h @@ -357,14 +357,6 @@ DivideAndRoundUp(size_t numerator, size_t divisor) { static_assert(ArenaSize % CellAlignBytes == 0, "Arena size must be a multiple of cell alignment"); -/* - * We sometimes use an index to refer to a cell in an arena. The index for a - * cell is found by dividing by the cell alignment so not all indicies refer to - * valid cells. - */ -const size_t ArenaCellIndexBytes = CellAlignBytes; -const size_t MaxArenaCellIndex = ArenaSize / CellAlignBytes; - /* * The mark bitmap has one bit per each possible cell start position. This * wastes some space for larger GC things but allows us to avoid division by the