From dfa8f858d68364382f0d48cbcf4943a01602dfbf Mon Sep 17 00:00:00 2001 From: Pekka Pirinen Date: Fri, 12 Jun 1998 17:04:52 +0100 Subject: [PATCH] Update allocation counters in poolalloc (change.dylan.crow.170322) Copied from Perforce Change: 19685 ServerID: perforce.ravenbrook.com --- mps/src/pool.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mps/src/pool.c b/mps/src/pool.c index e8d2e792dd9..ef731dda439 100644 --- a/mps/src/pool.c +++ b/mps/src/pool.c @@ -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;