1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-05 19:31:02 -08:00

Use unused_pointer and unused_size now we have 'em.

Copied from Perforce
 Change: 186492
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-06-11 13:59:02 +01:00
parent de2a30d207
commit a331b13075
3 changed files with 13 additions and 12 deletions

View file

@ -388,6 +388,7 @@ void ArenaDestroy(Arena arena)
LandFinish(ArenaFreeLand(arena));
/* The CBS block pool can't free its own memory via ArenaFree because
that would use the ZonedCBS. */
MFSFinishTracts(ArenaCBSBlockPool(arena), arenaMFSPageFreeVisitor,
UNUSED_POINTER, UNUSED_SIZE);

View file

@ -179,9 +179,9 @@ static Bool clientChunkDestroy(Tree tree, void *closureP, Size closureS)
ClientChunk clChunk;
AVERT(Tree, tree);
/* FIXME: AVER(closureP == UNUSED_POINTER); */
AVER(closureP == UNUSED_POINTER);
UNUSED(closureP);
/* FIXME: AVER(closureS == UNUSED_SIZE); */
AVER(closureS == UNUSED_SIZE);
UNUSED(closureS);
chunk = ChunkOfTree(tree);
@ -308,8 +308,8 @@ static void ClientArenaFinish(Arena arena)
/* Destroy all chunks, including the primary. See
* <design/arena/#chunk.delete> */
arena->primary = NULL;
/* FIXME: use UNUSED_POINTER, UNUSED_SIZE instead of NULL, 0 */
TreeTraverseAndDelete(&arena->chunkTree, clientChunkDestroy, NULL, 0);
TreeTraverseAndDelete(&arena->chunkTree, clientChunkDestroy,
UNUSED_POINTER, UNUSED_SIZE);
clientArena->sig = SigInvalid;

View file

@ -408,9 +408,9 @@ static Bool vmChunkDestroy(Tree tree, void *closureP, Size closureS)
VMChunk vmChunk;
AVERT(Tree, tree);
/* FIXME: AVER(closureP == UNUSED_POINTER); */
AVER(closureP == UNUSED_POINTER);
UNUSED(closureP);
/* FIXME: AVER(closureS == UNUSED_SIZE); */
AVER(closureS == UNUSED_SIZE);
UNUSED(closureS);
chunk = ChunkOfTree(tree);
@ -609,8 +609,8 @@ static void VMArenaFinish(Arena arena)
/* Destroy all chunks, including the primary. See
* <design/arena/#chunk.delete> */
arena->primary = NULL;
/* FIXME: use UNUSED_POINTER, UNUSED_SIZE instead of NULL, 0 */
TreeTraverseAndDelete(&arena->chunkTree, vmChunkDestroy, NULL, 0);
TreeTraverseAndDelete(&arena->chunkTree, vmChunkDestroy,
UNUSED_POINTER, UNUSED_SIZE);
/* Destroying the chunks should have purged and removed all spare pages. */
RingFinish(&vmArena->spareRing);
@ -1102,7 +1102,7 @@ static Bool vmChunkCompact(Tree tree, void *closureP, Size closureS)
AVERT(Tree, tree);
AVERT(Arena, arena);
/* FIXME: AVER(closureS == UNUSED_SIZE); */
AVER(closureS == UNUSED_SIZE);
UNUSED(closureS);
vmArena = Arena2VMArena(arena);
@ -1114,7 +1114,7 @@ static Bool vmChunkCompact(Tree tree, void *closureP, Size closureS)
{
Addr base = chunk->base;
Size size = ChunkSize(chunk);
vmChunkDestroy(tree, closureP, closureS);
vmChunkDestroy(tree, UNUSED_POINTER, UNUSED_SIZE);
vmArena->contracted(arena, base, size);
return TRUE;
} else {
@ -1138,8 +1138,8 @@ static void VMCompact(Arena arena, Trace trace)
/* Destroy chunks that are completely free, but not the primary
* chunk. See <design/arena/#chunk.delete>
* TODO: add hysteresis here. See job003815. */
/* FIXME: use UNUSED_SIZE instead of 0 */
TreeTraverseAndDelete(&arena->chunkTree, vmChunkCompact, arena, 0);
TreeTraverseAndDelete(&arena->chunkTree, vmChunkCompact, arena,
UNUSED_SIZE);
{
Size vmem0 = trace->preTraceArenaReserved;