mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-19 01:10:57 -08:00
Initialize the cache high water mark
Copied from Perforce Change: 19347 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
6ab9f7bfb5
commit
02dec8e9e5
1 changed files with 6 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/* impl.c.arena: ARENA IMPLEMENTATION
|
||||
*
|
||||
* $HopeName: MMsrc!arena.c(trunk.28) $
|
||||
* $HopeName: MMsrc!arena.c(trunk.29) $
|
||||
* Copyright (C) 1997 The Harlequin Group Limited. All rights reserved.
|
||||
*
|
||||
* .readership: Any MPS developer
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
#include "poolmrg.h"
|
||||
#include "mps.h"
|
||||
|
||||
SRCID(arena, "$HopeName: MMsrc!arena.c(trunk.28) $");
|
||||
SRCID(arena, "$HopeName: MMsrc!arena.c(trunk.29) $");
|
||||
|
||||
|
||||
/* All static data objects are declared here. See .static */
|
||||
|
|
@ -136,11 +136,12 @@ Bool ArenaCheck(Arena arena)
|
|||
CHECKL(RingCheck(&arena->threadRing));
|
||||
|
||||
CHECKL(BoolCheck(arena->insideShield));
|
||||
CHECKL(arena->shCacheI < SHIELD_CACHE_SIZE);
|
||||
CHECKL(arena->shCacheLimit <= SHIELD_CACHE_SIZE);
|
||||
CHECKL(arena->shCacheI < arena->shCacheLimit);
|
||||
CHECKL(BoolCheck(arena->suspended));
|
||||
|
||||
depth = 0;
|
||||
for (i=0; i < SHIELD_CACHE_SIZE; ++i) {
|
||||
for (i=0; i < arena->shCacheLimit; ++i) {
|
||||
Seg seg = arena->shCache[i];
|
||||
if (seg != (Seg)0) {
|
||||
CHECKL(SegCheck(seg));
|
||||
|
|
@ -230,6 +231,7 @@ void ArenaInit(Arena arena, ArenaClass class)
|
|||
LockInit(&arena->lockStruct);
|
||||
arena->insideShield = FALSE; /* impl.c.shield */
|
||||
arena->shCacheI = (Size)0;
|
||||
arena->shCacheLimit = (Size)1;
|
||||
arena->shDepth = (Size)0;
|
||||
arena->suspended = FALSE;
|
||||
for(i = 0; i < SHIELD_CACHE_SIZE; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue