diff --git a/mps/src/buffer.c b/mps/src/buffer.c index 3c3a6012ca2..5b10e0677ce 100644 --- a/mps/src/buffer.c +++ b/mps/src/buffer.c @@ -2,7 +2,7 @@ * * ALLOCATION BUFFER IMPLEMENTATION * - * $HopeName: MMsrc!buffer.c(trunk.4) $ + * $HopeName: MMsrc!buffer.c(trunk.5) $ * * Copyright (C) 1995 Harlequin Group, all rights reserved * @@ -43,7 +43,7 @@ #include "shield.h" #include "trace.h" -SRCID("$HopeName"); +SRCID("$HopeName$"); static SigStruct BufferSigStruct; @@ -272,6 +272,8 @@ Error BufferFill(Addr *pReturn, Buffer buffer, Addr size) AVER(ISVALID(Buffer, buffer)); + SpacePoll(BufferSpace(buffer)); + return e; } diff --git a/mps/src/pool.c b/mps/src/pool.c index d4b72ba1015..2b6740912a2 100644 --- a/mps/src/pool.c +++ b/mps/src/pool.c @@ -1,14 +1,10 @@ -/* ==== POOLS ==== +/* impl.c.pool: POOL IMPLEMENTATION * - * $HopeName: MMsrc!pool.c(trunk.8) $ + * $HopeName: MMsrc!pool.c(trunk.9) $ + * Copyright (C) 1994,1995,1996 Harlequin Group, all rights reserved * - * Copyright (C) 1994,1995 Harlequin Group, all rights reserved - * - * This is the implementation of the generic pool interface. The - * functions here dispatch to pool-specific methods. - * - * Notes - * 2. Some explanatory comments would be nice. richard 1994-08-25 + * This is the implementation of the generic pool interface. The + * functions here dispatch to pool-specific methods. */ #include "std.h" @@ -23,15 +19,12 @@ #include #include -SRCID("$HopeName$"); +SRCID("$HopeName: MMsrc!pool.c(trunk.9) $"); static SigStruct PoolSigStruct; - -#ifdef DEBUG - Bool PoolIsValid(Pool pool, ValidationType validParam) { AVER(pool != NULL); @@ -44,8 +37,6 @@ Bool PoolIsValid(Pool pool, ValidationType validParam) return TRUE; } -#endif /* DEBUG */ - void PoolInit(Pool pool, Space space, PoolClass class) { @@ -120,10 +111,11 @@ Error (PoolAlloc)(Addr *pReturn, Pool pool, Size size) /* Make sure that the allocated address was in the pool's memory. */ AVER(PoolHasAddr(pool, (Addr)*pReturn)); + SpacePoll(PoolSpace(pool)); + return ErrSUCCESS; } - void PoolFree(Pool pool, Addr old, Size size) { AVER(ISVALID(Pool, pool)); @@ -141,14 +133,12 @@ Error PoolCondemn(Pool pool, Trace trace) return (*pool->class->condemn)(pool, trace); } - void PoolMark(Pool pool, Trace trace) { if(pool->class->mark != NULL) (*pool->class->mark)(pool, trace); } - Error PoolScan(Pool pool, Trace trace) { if(pool->class->scan != NULL) @@ -169,6 +159,7 @@ void PoolReclaim(Pool pool, Trace trace) (*pool->class->reclaim)(pool, trace); } + void PoolAccess(Pool pool, Addr seg, ProtMode mode) { if(pool->class->access != NULL) @@ -176,6 +167,14 @@ void PoolAccess(Pool pool, Addr seg, ProtMode mode) } +Size PoolPoll(Pool pool) +{ + if(pool->class->poll != NULL) + return (*pool->class->poll)(pool); + return SPACE_POLL_MAX; +} + + Error PoolDescribe(Pool pool, LibStream stream) { AVER(ISVALID(Pool, pool));