Check that sparsearraymap makes some (or no) progress.

Copied from Perforce
 Change: 187465
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-11-06 10:56:45 +00:00
parent 5429892633
commit 506aa1f362

View file

@ -784,7 +784,9 @@ static Res pageDescMap(VMChunk vmChunk, Index basePI, Index limitPI)
Size before = VMMapped(VMChunkVM(vmChunk));
Arena arena = VMArena2Arena(VMChunkVMArena(vmChunk));
Res res = SparseArrayMap(&vmChunk->pages, basePI, limitPI);
arena->committed += VMMapped(VMChunkVM(vmChunk)) - before;
Size after = VMMapped(VMChunkVM(vmChunk));
AVER(before <= after);
arena->committed += after - before;
return res;
}