1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-27 09:11:48 -07:00

Change amcgen*frequency scale

Copied from Perforce
 Change: 21373
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Pekka Pirinen 2000-07-24 20:31:08 +01:00
parent 28f6789454
commit 7f7caa9e16

View file

@ -1,6 +1,6 @@
/* impl.c.poolawl: AUTOMATIC WEAK LINKED POOL CLASS
*
* $HopeName: MMsrc!poolawl.c(trunk.62) $
* $HopeName: MMsrc!poolawl.c(trunk.63) $
* Copyright (C) 1999 Harlequin Limited. All rights reserved.
*
* DESIGN
@ -41,7 +41,7 @@
#include "mpm.h"
SRCID(poolawl, "$HopeName: MMsrc!poolawl.c(trunk.62) $");
SRCID(poolawl, "$HopeName: MMsrc!poolawl.c(trunk.63) $");
#define AWLSig ((Sig)0x519b7a37) /* SIGPooLAWL */
@ -84,13 +84,16 @@ typedef struct AWLStruct {
AWLStatTotalStruct stats;
} AWLStruct, *AWL;
static Bool AWLCheck(AWL awl);
/* PoolPoolAWL -- convert generic Pool to AWL */
#define PoolPoolAWL(pool) \
PARENT(AWLStruct, poolStruct, (pool))
/* ActionAWL -- converts action to the enclosing AWL */
#define ActionAWL(action) PARENT(AWLStruct, actionStruct, action)
@ -1122,11 +1125,13 @@ static Res AWLAccess(Pool pool, Seg seg, Addr addr,
}
/* AWLBenefit -- calculate the benefit of starting an AWL-only collection */
static double AWLBenefit(Pool pool, Action action)
{
AWL awl;
Arena arena;
double f; /* frequency of collection, in Mb of alloc */
double f; /* frequency of collection, in kB of alloc */
AVERT(Pool, pool);
awl = PoolPoolAWL(pool);
@ -1154,7 +1159,7 @@ static double AWLBenefit(Pool pool, Action action)
arena = PoolArena(pool);
return (ArenaMutatorAllocSize(arena) - awl->lastCollected) - f * 1024*1024L;
return (ArenaMutatorAllocSize(arena) - awl->lastCollected) - f * 1024uL;
}