aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/pool.c
diff options
context:
space:
mode:
authorNick Barnes2001-12-17 15:18:17 +0000
committerNick Barnes2001-12-17 15:18:17 +0000
commitdb4b3a6fa51ea452f62ed64612da5466d7bc292e (patch)
tree4401c0c97d4df2e1c48ad06f263c27199e92d5dc /mps/code/pool.c
parentc864931fe4271b6592ca4a76ce856938d263c74a (diff)
downloademacs-db4b3a6fa51ea452f62ed64612da5466d7bc292e.tar.gz
emacs-db4b3a6fa51ea452f62ed64612da5466d7bc292e.zip
Remove trailing whitespace.
Copied from Perforce Change: 25309 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/pool.c')
-rw-r--r--mps/code/pool.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/mps/code/pool.c b/mps/code/pool.c
index 2389cdcfb2b..71f32977824 100644
--- a/mps/code/pool.c
+++ b/mps/code/pool.c
@@ -175,7 +175,7 @@ failInit:
175 175
176/* PoolCreate, PoolCreateV: Allocate and initialise pool */ 176/* PoolCreate, PoolCreateV: Allocate and initialise pool */
177 177
178Res PoolCreate(Pool *poolReturn, Arena arena, 178Res PoolCreate(Pool *poolReturn, Arena arena,
179 PoolClass class, ...) 179 PoolClass class, ...)
180{ 180{
181 Res res; 181 Res res;
@@ -186,7 +186,7 @@ Res PoolCreate(Pool *poolReturn, Arena arena,
186 return res; 186 return res;
187} 187}
188 188
189Res PoolCreateV(Pool *poolReturn, Arena arena, 189Res PoolCreateV(Pool *poolReturn, Arena arena,
190 PoolClass class, va_list args) 190 PoolClass class, va_list args)
191{ 191{
192 Res res; 192 Res res;
@@ -199,8 +199,8 @@ Res PoolCreateV(Pool *poolReturn, Arena arena,
199 199
200 /* .space.alloc: Allocate the pool instance structure with the size */ 200 /* .space.alloc: Allocate the pool instance structure with the size */
201 /* requested in the pool class. See .space.free */ 201 /* requested in the pool class. See .space.free */
202 res = ControlAlloc(&base, arena, class->size, 202 res = ControlAlloc(&base, arena, class->size,
203 /* withReservoirPermit */ FALSE); 203 /* withReservoirPermit */ FALSE);
204 if (res != ResOK) 204 if (res != ResOK)
205 goto failControlAlloc; 205 goto failControlAlloc;
206 206
@@ -209,12 +209,12 @@ Res PoolCreateV(Pool *poolReturn, Arena arena,
209 /* instance by using the offset information from the class. */ 209 /* instance by using the offset information from the class. */
210 pool = (Pool)PointerAdd(base, class->offset); 210 pool = (Pool)PointerAdd(base, class->offset);
211 211
212 /* Initialize the pool. */ 212 /* Initialize the pool. */
213 res = PoolInitV(pool, arena, class, args); 213 res = PoolInitV(pool, arena, class, args);
214 if (res != ResOK) 214 if (res != ResOK)
215 goto failPoolInit; 215 goto failPoolInit;
216 216
217 *poolReturn = pool; 217 *poolReturn = pool;
218 return ResOK; 218 return ResOK;
219 219
220failPoolInit: 220failPoolInit:
@@ -228,19 +228,19 @@ failControlAlloc:
228 228
229void PoolFinish(Pool pool) 229void PoolFinish(Pool pool)
230{ 230{
231 AVERT(Pool, pool); 231 AVERT(Pool, pool);
232 232
233 /* Do any class-specific finishing. */ 233 /* Do any class-specific finishing. */
234 (*pool->class->finish)(pool); 234 (*pool->class->finish)(pool);
235 235
236 /* Detach the pool from the arena, and unsig it. */ 236 /* Detach the pool from the arena, and unsig it. */
237 RingRemove(&pool->arenaRing); 237 RingRemove(&pool->arenaRing);
238 pool->sig = SigInvalid; 238 pool->sig = SigInvalid;
239 239
240 RingFinish(&pool->segRing); 240 RingFinish(&pool->segRing);
241 RingFinish(&pool->bufferRing); 241 RingFinish(&pool->bufferRing);
242 RingFinish(&pool->arenaRing); 242 RingFinish(&pool->arenaRing);
243 243
244 EVENT_P(PoolFinish, pool); 244 EVENT_P(PoolFinish, pool);
245} 245}
246 246
@@ -253,8 +253,8 @@ void PoolDestroy(Pool pool)
253 Arena arena; 253 Arena arena;
254 Addr base; 254 Addr base;
255 255
256 AVERT(Pool, pool); 256 AVERT(Pool, pool);
257 257
258 class = pool->class; /* } In case PoolFinish changes these */ 258 class = pool->class; /* } In case PoolFinish changes these */
259 arena = pool->arena; /* } */ 259 arena = pool->arena; /* } */
260 260
@@ -278,7 +278,7 @@ BufferClass PoolDefaultBufferClass(Pool pool)
278 278
279/* PoolAlloc -- allocate a block of memory from a pool */ 279/* PoolAlloc -- allocate a block of memory from a pool */
280 280
281Res PoolAlloc(Addr *pReturn, Pool pool, Size size, 281Res PoolAlloc(Addr *pReturn, Pool pool, Size size,
282 Bool withReservoirPermit) 282 Bool withReservoirPermit)
283{ 283{
284 Res res; 284 Res res;
@@ -318,7 +318,7 @@ void PoolFree(Pool pool, Addr old, Size size)
318 /* The pool methods should check that old is in pool. */ 318 /* The pool methods should check that old is in pool. */
319 AVER(size > 0); 319 AVER(size > 0);
320 (*pool->class->free)(pool, old, size); 320 (*pool->class->free)(pool, old, size);
321 321
322 EVENT_PAW(PoolFree, pool, old, size); 322 EVENT_PAW(PoolFree, pool, old, size);
323} 323}
324 324
@@ -340,7 +340,7 @@ Res PoolAccess(Pool pool, Seg seg, Addr addr,
340/* PoolWhiten, PoolGrey, PoolBlacken -- change color of a segment in the pool */ 340/* PoolWhiten, PoolGrey, PoolBlacken -- change color of a segment in the pool */
341 341
342Res PoolWhiten(Pool pool, Trace trace, Seg seg) 342Res PoolWhiten(Pool pool, Trace trace, Seg seg)
343{ 343{
344 AVERT(Pool, pool); 344 AVERT(Pool, pool);
345 AVERT(Trace, trace); 345 AVERT(Trace, trace);
346 AVERT(Seg, seg); 346 AVERT(Seg, seg);
@@ -475,12 +475,12 @@ Res PoolDescribe(Pool pool, mps_lib_FILE *stream)
475 475
476 if (!CHECKT(Pool, pool)) return ResFAIL; 476 if (!CHECKT(Pool, pool)) return ResFAIL;
477 if (stream == NULL) return ResFAIL; 477 if (stream == NULL) return ResFAIL;
478 478
479 res = WriteF(stream, 479 res = WriteF(stream,
480 "Pool $P ($U) {\n", (WriteFP)pool, (WriteFU)pool->serial, 480 "Pool $P ($U) {\n", (WriteFP)pool, (WriteFU)pool->serial,
481 " class $P (\"$S\")\n", 481 " class $P (\"$S\")\n",
482 (WriteFP)pool->class, pool->class->name, 482 (WriteFP)pool->class, pool->class->name,
483 " arena $P ($U)\n", 483 " arena $P ($U)\n",
484 (WriteFP)pool->arena, (WriteFU)pool->arena->serial, 484 (WriteFP)pool->arena, (WriteFU)pool->arena->serial,
485 " alignment $W\n", (WriteFW)pool->alignment, 485 " alignment $W\n", (WriteFW)pool->alignment,
486 NULL); 486 NULL);