From 05408fa99236e0d0c8ac669ede374613fc4bbefa Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Tue, 30 Sep 2014 18:57:50 +0100 Subject: [PATCH] Remove orphaned comment (originally from grm in change 19855) about being unable to "check that limit>=size" (referring to the reservoir). it seems, at least from testing, that this check is good now, so add it to reservoircheck. Copied from Perforce Change: 187092 ServerID: perforce.ravenbrook.com --- mps/code/arena.c | 3 --- mps/code/reserv.c | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/mps/code/arena.c b/mps/code/arena.c index e8efe5d9bdb..c42b7e56cf9 100644 --- a/mps/code/arena.c +++ b/mps/code/arena.c @@ -142,9 +142,6 @@ Bool ArenaCheck(Arena arena) CHECKD(Reservoir, &arena->reservoirStruct); } - /* Can't check that limit>=size because we may call ArenaCheck */ - /* while the size is being adjusted. */ - CHECKL(arena->committed <= arena->commitLimit); CHECKL(arena->spareCommitted <= arena->committed); diff --git a/mps/code/reserv.c b/mps/code/reserv.c index b0d431c3f9c..91a2fd52559 100644 --- a/mps/code/reserv.c +++ b/mps/code/reserv.c @@ -100,6 +100,7 @@ Bool ReservoirCheck(Reservoir reservoir) } CHECKL(SizeIsArenaGrains(reservoir->reservoirLimit, arena)); CHECKL(SizeIsArenaGrains(reservoir->reservoirSize, arena)); + CHECKL(reservoir->reservoirSize <= reservoir->reservoirLimit); return TRUE; }