1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 07:11:34 -08:00

The primary chunk is always the last chunk to be removed, so assert that. review suggestion from rb; see <https://info.ravenbrook.com/mail/2015/08/07/13-56-51/0/>

Copied from Perforce
 Change: 188089
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2015-08-07 16:14:50 +01:00
parent 0394f40751
commit b3e8eb2280

View file

@ -701,12 +701,16 @@ void ArenaChunkRemoved(Arena arena, Chunk chunk)
AVERT(Arena, arena);
AVERT(Chunk, chunk);
if (arena->primary == chunk)
arena->primary = NULL;
size = ChunkReserved(chunk);
AVER(arena->reserved >= size);
arena->reserved -= size;
if (chunk == arena->primary) {
/* The primary chunk must be the last chunk to be removed. */
AVER(RingIsSingle(&arena->chunkRing));
AVER(arena->reserved == 0);
arena->primary = NULL;
}
}