From dfd26e7a4dc170cdbac4a1ad82f32e31a0e5f77a Mon Sep 17 00:00:00 2001 From: Pekka Pirinen Date: Mon, 25 Sep 2000 18:04:44 +0100 Subject: [PATCH] Smaller size Copied from Perforce Change: 21541 ServerID: perforce.ravenbrook.com --- mps/src/apss.c | 67 +++++++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 39 deletions(-) diff --git a/mps/src/apss.c b/mps/src/apss.c index b92b7e5a2d6..8020c4fe81f 100644 --- a/mps/src/apss.c +++ b/mps/src/apss.c @@ -1,7 +1,7 @@ /* impl.c.apss: AP MANUAL ALLOC STRESS TEST * - * $HopeName: !apss.c(trunk.4) $ - * Copyright (C) 1999 Harlequin Group plc. All rights reserved. + * $HopeName: MMsrc!apss.c(MMconfigura_eval_fast.1) $ + * Copyright (C) 2000 Harlequin Limited. All rights reserved. */ @@ -9,15 +9,9 @@ #include "mpscmvff.h" #include "mpslib.h" #include "mpsavm.h" -#include "mps.h" #include "testlib.h" -#include -#include "mpstd.h" -#ifdef MPS_OS_SU -#include "ossu.h" -#endif #include #include #ifdef MPS_OS_IA @@ -29,7 +23,7 @@ struct itimerspec; /* stop complaints from time.h */ #define TRUE 1 #define FALSE 0 -#define testArenaSIZE ((((size_t)64)<<20) - 4) +#define testArenaSIZE ((((size_t)3)<<23) - 4) #define testSetSIZE 200 #define testLOOPS 10 @@ -51,7 +45,7 @@ static mps_res_t make(mps_addr_t *p, mps_ap_t ap, size_t size) static mps_res_t stress(mps_class_t class, mps_arena_t arena, size_t (*size)(int i), ...) { - mps_res_t res; + mps_res_t res = MPS_RES_OK; mps_pool_t pool; mps_ap_t ap; va_list arg; @@ -73,14 +67,10 @@ static mps_res_t stress(mps_class_t class, mps_arena_t arena, res = make((mps_addr_t *)&ps[i], ap, ss[i]); if (res != MPS_RES_OK) - return res; + goto allocFail; if (ss[i] >= sizeof(ps[i])) *ps[i] = 1; /* Write something, so it gets swap. */ - - if (i && i%4==0) putchar('\n'); - printf("%8lX %6lX ", (unsigned long)ps[i], (unsigned long)ss[i]); } - putchar('\n'); mps_pool_check_fenceposts(pool); @@ -107,18 +97,16 @@ static mps_res_t stress(mps_class_t class, mps_arena_t arena, for (i=testSetSIZE/2; i