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

Update allocation counters in poolalloc (change.dylan.crow.170322)

Copied from Perforce
 Change: 19685
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Pekka Pirinen 1998-06-12 17:04:52 +01:00
parent 9b4894c0d6
commit dfa8f858d6

View file

@ -1,6 +1,6 @@
/* impl.c.pool: POOL IMPLEMENTATION
*
* $HopeName: MMsrc!pool.c(trunk.53) $
* $HopeName: MMsrc!pool.c(trunk.54) $
* Copyright (C) 1997. Harlequin Group plc. All rights reserved.
*
* READERSHIP
@ -37,7 +37,7 @@
#include "mpm.h"
SRCID(pool, "$HopeName: MMsrc!pool.c(trunk.53) $");
SRCID(pool, "$HopeName: MMsrc!pool.c(trunk.54) $");
Bool PoolClassCheck(PoolClass class)
@ -268,12 +268,16 @@ Res PoolAlloc(Addr *pReturn, Pool pool, Size size)
res = (*pool->class->alloc)(pReturn, pool, size);
if(res != ResOK)
return res;
/* Make sure that the allocated address was in the pool's memory. */
/* .hasaddr.critical: The PoolHasAddr check is expensive, and in */
/* allocation-bound programs this is on the critical path. */
AVER_CRITICAL(PoolHasAddr(pool, *pReturn));
/* All PoolAllocs should advance the allocation clock, so we count */
/* it all in the fillMutatorSize field. */
pool->fillMutatorSize += size;
PoolArena(pool)->fillMutatorSize += size;
EVENT_PAW(PoolAlloc, pool, *pReturn, size);
return ResOK;