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