// BaseChunkIdx is a convenient chunkIdx value which works on both
// 64 bit and 32 bit platforms, allowing the tests to share code
// between the two.
-var BaseChunkIdx = ChunkIdx(chunkIndex((0xc000*pageAlloc64Bit + 0x200*pageAlloc32Bit) * pallocChunkBytes))
+//
+// This should not be higher than 0x100*pallocChunkBytes to support
+// mips and mipsle, which only have 31-bit address spaces.
+var BaseChunkIdx = ChunkIdx(chunkIndex((0xc000*pageAlloc64Bit + 0x100*pageAlloc32Bit) * pallocChunkBytes))
// PageBase returns an address given a chunk index and a page index
// relative to that chunk.
},
"NotContiguousPallocChunkPages*2": {
before: map[ChunkIdx][]BitRange{
- BaseChunkIdx: {},
- BaseChunkIdx + 0x100: {},
- BaseChunkIdx + 0x101: {},
+ BaseChunkIdx: {},
+ BaseChunkIdx + 0x40: {},
+ BaseChunkIdx + 0x41: {},
},
scav: map[ChunkIdx][]BitRange{
- BaseChunkIdx: {{0, PallocChunkPages}},
- BaseChunkIdx + 0x100: {},
- BaseChunkIdx + 0x101: {},
+ BaseChunkIdx: {{0, PallocChunkPages}},
+ BaseChunkIdx + 0x40: {},
+ BaseChunkIdx + 0x41: {},
},
hits: []hit{
- {PallocChunkPages * 2, PageBase(BaseChunkIdx+0x100, 0), 0},
+ {PallocChunkPages * 2, PageBase(BaseChunkIdx+0x40, 0), 0},
{21, PageBase(BaseChunkIdx, 0), 21 * PageSize},
{1, PageBase(BaseChunkIdx, 21), PageSize},
},
after: map[ChunkIdx][]BitRange{
- BaseChunkIdx: {{0, 22}},
- BaseChunkIdx + 0x100: {{0, PallocChunkPages}},
- BaseChunkIdx + 0x101: {{0, PallocChunkPages}},
+ BaseChunkIdx: {{0, 22}},
+ BaseChunkIdx + 0x40: {{0, PallocChunkPages}},
+ BaseChunkIdx + 0x41: {{0, PallocChunkPages}},
},
},
"StraddlePallocChunkPages*2": {