/* TEST_HEADER id = $HopeName$ summary = MFS functional test allocate and free in manual fixed small pool language = c link = testlib.o END_HEADER */ #include #include "testlib.h" #include "mpscmfs.h" #define MAXNUMBER 1000000 void *stackpointer; mps_space_t space; static mps_addr_t queue[MAXNUMBER]; enum {SEQ=0, RAN=1, SEQGAP=2, RANGAP=3}; static char *tdesc[] = {"sequential", "random", "sequential gap", "random gap"}; static void dotest(int kind, size_t unitSize, size_t extendBy, int number, int iter) { mps_pool_t pool; int i, hd; clock_t time0, time1; int secs; asserts(number <= MAXNUMBER, "number too big"); asserts(unitSize >= sizeof(int), "unitSize too small"); time0 = clock(); asserts(time0 != -1, "processor time not available"); die( mps_pool_create(&pool, space, mps_class_mfs(), extendBy, unitSize), "create pool"); for(hd=0; hd