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:
parent
0394f40751
commit
b3e8eb2280
1 changed files with 7 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue