зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1407682 - Part 1: move ArenaCellIndexBytes and MaxArenaCellIndex r=jonco
This commit is contained in:
Родитель
6eb5662c81
Коммит
efdeb7661d
|
@ -42,6 +42,14 @@ const size_t CellAlignMask = CellAlignBytes - 1;
|
||||||
|
|
||||||
const size_t CellBytesPerMarkBit = CellAlignBytes;
|
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. */
|
/* These are magic constants derived from actual offsets in gc/Heap.h. */
|
||||||
#ifdef JS_GC_SMALL_CHUNK_SIZE
|
#ifdef JS_GC_SMALL_CHUNK_SIZE
|
||||||
const size_t ChunkMarkBitmapOffset = 258104;
|
const size_t ChunkMarkBitmapOffset = 258104;
|
||||||
|
|
|
@ -357,14 +357,6 @@ DivideAndRoundUp(size_t numerator, size_t divisor) {
|
||||||
static_assert(ArenaSize % CellAlignBytes == 0,
|
static_assert(ArenaSize % CellAlignBytes == 0,
|
||||||
"Arena size must be a multiple of cell alignment");
|
"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
|
* 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
|
* wastes some space for larger GC things but allows us to avoid division by the
|
||||||
|
|
Загрузка…
Ссылка в новой задаче