1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 12:40:49 -08:00

Replace deprecatd mv with mvff in test cases.

Delete eventrep and replay modules -- these have been broken for a long time. 

Copied from Perforce
 Change: 194843
This commit is contained in:
Gareth Rees 2018-08-01 13:10:09 +01:00
parent 5735d7e78a
commit 4e8de8d42e
46 changed files with 249 additions and 1506 deletions

View file

@ -1,7 +1,7 @@
/*
TEST_HEADER
id = $Id$
summary = MV functional tests allocate and free in manual variable pool
summary = MVFF allocate and free
language = c
link = testlib.o
END_HEADER
@ -9,7 +9,7 @@ END_HEADER
#include <time.h>
#include "testlib.h"
#include "mpscmv.h"
#include "mpscmvff.h"
#define MAXNUMBER 1000000
@ -54,7 +54,7 @@ static int chkobj(mps_addr_t a, size_t size, unsigned char val)
}
static void dt(int kind,
size_t extendBy, size_t avgSize, size_t maxSize,
size_t extendBy, size_t avgSize,
size_t mins, size_t maxs, int number, int iter)
{
mps_pool_t pool;
@ -68,10 +68,11 @@ static void dt(int kind,
time0 = clock();
asserts(time0 != -1, "processor time not available");
die(
mps_pool_create(&pool, arena, mps_class_mv(),
extendBy, avgSize, maxSize),
"create pool");
MPS_ARGS_BEGIN(args) {
MPS_ARGS_ADD(args, MPS_KEY_EXTEND_BY, extendBy);
MPS_ARGS_ADD(args, MPS_KEY_MEAN_SIZE, avgSize);
cdie(mps_pool_create_k(&pool, arena, mps_class_mvff(), args), "pool");
} MPS_ARGS_END(args);
for(hd=0; hd<number; hd++)
{
@ -99,9 +100,9 @@ static void dt(int kind,
if (queue[hd].addr != NULL)
{
asserts(chkobj(queue[hd].addr, queue[hd].size, hd%256),
"corrupt at %x (%s: %x, %x, %x, %x, %x, %i, %i)",
"corrupt at %x (%s: %x, %x, %x, %x, %i, %i)",
queue[hd].addr,
tdesc[kind], (int) extendBy, (int) avgSize, (int) maxSize,
tdesc[kind], (int) extendBy, (int) avgSize,
(int) mins, (int) maxs, number, iter);
mps_free(pool, queue[hd].addr, queue[hd].size);
}
@ -124,8 +125,8 @@ static void dt(int kind,
time1=clock();
secs=(time1-time0)/(double)CLOCKS_PER_SEC;
comment("%s test (%x, %x, %x, %x, %x, %i, %i) in %.2f s",
tdesc[kind], (int) extendBy, (int) avgSize, (int) maxSize,
comment("%s test (%x, %x, %x, %x, %i, %i) in %.2f s",
tdesc[kind], (int) extendBy, (int) avgSize,
(int) mins, (int) maxs, number, iter, secs);
}
@ -139,26 +140,26 @@ static void test(void)
mins = sizeof(int);
dt(SEQ, 4096, 32, 64*1024, 8, 9, 5, 10);
dt(RANGAP, 64, 64, 64, 8, 128, 100, 1000);
dt(SEQ, 4096, 32, 8, 9, 5, 10);
dt(RANGAP, 64, 64, 8, 128, 100, 1000);
dt(DUMMY, 4096, 32, 64*1024, 8, 64, 1000, 10000);
dt(SEQ, 4096, 32, 64*1024, 8, 64, 1000, 10000);
dt(RAN, 4096, 32, 64*1024, 8, 64, 1000, 10000);
dt(SEQGAP, 4096, 32, 64*1024, 8, 64, 1000, 10000);
dt(RANGAP, 4096, 32, 64*1024, 8, 64, 1000, 10000);
dt(DUMMY, 4096, 32, 8, 64, 1000, 10000);
dt(SEQ, 4096, 32, 8, 64, 1000, 10000);
dt(RAN, 4096, 32, 8, 64, 1000, 10000);
dt(SEQGAP, 4096, 32, 8, 64, 1000, 10000);
dt(RANGAP, 4096, 32, 8, 64, 1000, 10000);
dt(DUMMY, 4096, 1024, 64*1024, 100, 132, 1000, 10000);
dt(SEQ, 4096, 1024, 64*1024, 100, 132, 1000, 10000);
dt(RAN, 4096, 1024, 64*1024, 100, 132, 1000, 10000);
dt(SEQGAP, 4096, 1024, 64*1024, 100, 132, 1000, 10000);
dt(RANGAP, 4096, 1024, 64*1024, 100, 132, 1000, 10000);
dt(DUMMY, 4096, 1024, 100, 132, 1000, 10000);
dt(SEQ, 4096, 1024, 100, 132, 1000, 10000);
dt(RAN, 4096, 1024, 100, 132, 1000, 10000);
dt(SEQGAP, 4096, 1024, 100, 132, 1000, 10000);
dt(RANGAP, 4096, 1024, 100, 132, 1000, 10000);
dt(DUMMY, 128*1024, 64*1024, 6400*1024, mins, 128*1024, 100, 10000);
dt(SEQ, 128*1024, 64*1024, 6400*1024, mins, 128*1024, 100, 10000);
dt(RAN, 128*1024, 64*1024, 6400*1024, mins, 128*1024, 100, 10000);
dt(SEQGAP, 128*1024, 64*1024, 6400*1024, mins, 128*1024, 100, 10000);
dt(RANGAP, 128*1024, 64*1024, 6400*1024, mins, 128*1024, 100, 10000);
dt(DUMMY, 128*1024, 64*1024, mins, 128*1024, 100, 10000);
dt(SEQ, 128*1024, 64*1024, mins, 128*1024, 100, 10000);
dt(RAN, 128*1024, 64*1024, mins, 128*1024, 100, 10000);
dt(SEQGAP, 128*1024, 64*1024, mins, 128*1024, 100, 10000);
dt(RANGAP, 128*1024, 64*1024, mins, 128*1024, 100, 10000);
mps_thread_dereg(thread);
mps_arena_destroy(arena);

View file

@ -1,7 +1,7 @@
/*
TEST_HEADER
id = $Id$
summary = more low memory tests with AMC (using MV)
summary = more low memory tests with AMC (using MVFF)
language = c
link = testlib.o rankfmt.o
END_HEADER
@ -9,7 +9,7 @@ END_HEADER
#include "testlib.h"
#include "mpscamc.h"
#include "mpscmv.h"
#include "mpscmvff.h"
#include "mpsavm.h"
#include "rankfmt.h"
@ -22,7 +22,7 @@ static mps_gen_param_s testChain[genCOUNT] = {
void *stackpointer;
mps_pool_t poolmv;
mps_pool_t poolmvff;
mps_arena_t arena;
@ -32,12 +32,11 @@ static void fillup(void)
mps_addr_t a;
char *b;
die(mps_pool_create(&poolmv, arena, mps_class_mv(),
(size_t)64, (size_t)64, (size_t)64),
"mps_pool_create");
cdie(mps_pool_create_k(&poolmvff, arena, mps_class_mvff(), mps_args_none),
"pool create");
size=1024ul*1024ul;
while (size) {
while (mps_alloc(&a, poolmv, size)==MPS_RES_OK) {
while (mps_alloc(&a, poolmvff, size)==MPS_RES_OK) {
for(b=a; b<(char *)a+size; b++) {
*b = 97;
}
@ -49,7 +48,7 @@ static void fillup(void)
static void empty(void)
{
mps_pool_destroy(poolmv);
mps_pool_destroy(poolmvff);
}

View file

@ -21,7 +21,7 @@ END_HEADER
#include "testlib.h"
#include "mpsavm.h"
#include "mpscmv.h"
#include "mpscmvff.h"
void *stackpointer;
@ -59,7 +59,7 @@ static void test(void) {
/* create a pool */
cdie(mps_pool_create(&pool, arena, mps_class_mv(), (size_t) 64, (size_t) 64, (size_t) 64), "pool create");
cdie(mps_pool_create_k(&pool, arena, mps_class_mvff(), mps_args_none), "pool");
for (i=0; i<100; i++) {
die(mps_alloc(&a, pool, (size_t) 64), "alloc");
@ -109,7 +109,7 @@ static void test(void) {
i = 0;
while (i < sizeof pools / sizeof pools[0]) {
res = mps_pool_create(&pools[i], arena, mps_class_mv(), (size_t) 64, (size_t) 64, (size_t) 64);
res = mps_pool_create_k(&pools[i], arena, mps_class_mvff(), mps_args_none);
if (res == MPS_RES_OK) {
i++;
} else {

View file

@ -12,7 +12,7 @@ END_HEADER
#include "testlib.h"
#include "mpsavm.h"
#include "mpscmv.h"
#include "mpscmvff.h"
void *stackpointer;
@ -39,7 +39,7 @@ static void test(void) {
/* create a pool */
cdie(mps_pool_create(&pool, arena, mps_class_mv(), (size_t) 64, (size_t) 64, (size_t) 64), "pool create");
cdie(mps_pool_create_k(&pool, arena, mps_class_mvff(), mps_args_none), "pool");
for (i=0; i<200; i++) {
report("count", "%i", i);

View file

@ -12,7 +12,7 @@ END_HEADER
#include "testlib.h"
#include "mpsavm.h"
#include "mpscamc.h"
#include "mpscmv.h"
#include "mpscmvff.h"
#include "newfmt.h"
@ -47,9 +47,7 @@ static void test(void)
die(mps_fmt_create_A(&format, arena, &fmtA), "create format");
die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create");
die(mps_pool_create(&pool, arena, mps_class_mv(),
(size_t)(1024*32), (size_t)(1024*16), (size_t)(1024*256)),
"create MV pool");
cdie(mps_pool_create_k(&pool, arena, mps_class_mvff(), mps_args_none), "pool");
do {
res = mps_alloc(&q, pool, 64*1024);

View file

@ -11,7 +11,7 @@ END_HEADER
#include "testlib.h"
#include "mpscamc.h"
#include "mpscmv.h"
#include "mpscmvff.h"
#include "mpsavm.h"
#include "newfmt.h"
@ -48,9 +48,7 @@ static void test(void)
die(mps_fmt_create_A(&format, arena, &fmtA), "create format");
die(mps_chain_create(&chain, arena, genCOUNT, testChain), "chain_create");
die(mps_pool_create(&pool, arena, mps_class_mv(),
(size_t)(1024*32), (size_t)(1024*16), (size_t)(1024*256)),
"create MV pool");
cdie(mps_pool_create_k(&pool, arena, mps_class_mvff(), mps_args_none), "pool");
while (mps_alloc(&q, pool, 64*1024)==MPS_RES_OK);
p = 0;

View file

@ -11,7 +11,7 @@ END_HEADER
#include "testlib.h"
#include "mpscamc.h"
#include "mpscmv.h"
#include "mpscmvff.h"
#include "newfmt.h"
void *stackpointer;
@ -32,9 +32,7 @@ static void test(void) {
die(mps_root_create_reg(&root, arena, mps_rank_ambig(), 0, thread,
mps_stack_scan_ambig, stackpointer, 0), "create root");
die(mps_pool_create(&pool, arena, mps_class_mv(),
(size_t)(1024*32), (size_t)(1024*16), (size_t)(1024*256)),
"create MV pool");
cdie(mps_pool_create_k(&pool, arena, mps_class_mvff(), mps_args_none), "pool");
while (mps_alloc(&q, pool, 64*1024)==MPS_RES_OK);
p=0;

View file

@ -1,7 +1,7 @@
/*
TEST_HEADER
id = $Id$
summary = new MV allocation test
summary = new MVFF allocation test
language = c
link = testlib.o
parameters = ITERATIONS=10000
@ -10,7 +10,7 @@ END_HEADER
#include <time.h>
#include "testlib.h"
#include "mpscmv.h"
#include "mpscmvff.h"
#include "mpsavm.h"
#define MAXNUMBER 1000000
@ -56,7 +56,7 @@ static int chkobj(mps_addr_t a, size_t size, unsigned char val)
}
static void dt(int kind,
size_t extendBy, size_t avgSize, size_t maxSize,
size_t extendBy, size_t avgSize,
unsigned long mins, unsigned long maxs, int number, int iter)
{
mps_pool_t pool;
@ -70,10 +70,11 @@ static void dt(int kind,
time0 = clock();
asserts(time0 != -1, "processor time not available");
die(
mps_pool_create(&pool, arena, mps_class_mv(),
extendBy, avgSize, maxSize),
"create MV pool");
MPS_ARGS_BEGIN(args) {
MPS_ARGS_ADD(args, MPS_KEY_EXTEND_BY, extendBy);
MPS_ARGS_ADD(args, MPS_KEY_MEAN_SIZE, avgSize);
cdie(mps_pool_create_k(&pool, arena, mps_class_mvff(), args), "pool");
} MPS_ARGS_END(args);
for(hd=0; hd<number; hd++)
{
@ -101,9 +102,9 @@ static void dt(int kind,
if (queue[hd].addr != NULL)
{
asserts(chkobj(queue[hd].addr, queue[hd].size, (unsigned char) (hd%256)),
"corrupt at %x (%s: %x, %x, %x, %lx, %lx, %i, %i)",
"corrupt at %x (%s: %x, %x, %lx, %lx, %i, %i)",
queue[hd].addr,
tdesc[kind], (int) extendBy, (int) avgSize, (int) maxSize,
tdesc[kind], (int) extendBy, (int) avgSize,
mins, maxs, number, iter);
mps_free(pool, queue[hd].addr, queue[hd].size);
}
@ -126,8 +127,8 @@ static void dt(int kind,
time1=clock();
secs=(time1-time0)/(double)CLOCKS_PER_SEC;
comment("%s test (%x, %x, %x, %lx, %lx, %i, %i) in %.2f s",
tdesc[kind], (int) extendBy, (int) avgSize, (int) maxSize,
comment("%s test (%x, %x, %lx, %lx, %i, %i) in %.2f s",
tdesc[kind], (int) extendBy, (int) avgSize,
mins, maxs, number, iter, secs);
}
@ -141,26 +142,26 @@ static void test(void)
mins = sizeof(int);
dt(SEQ, 4096, 32, 64*1024, 8, 9, 5, ITERATIONS);
dt(RANGAP, 64, 64, 64, 8, 128, 100, ITERATIONS);
dt(SEQ, 4096, 32, 8, 9, 5, ITERATIONS);
dt(RANGAP, 64, 64, 8, 128, 100, ITERATIONS);
dt(DUMMY, 4096, 32, 64*1024, 8, 64, 1000, ITERATIONS);
dt(SEQ, 4096, 32, 64*1024, 8, 64, 1000, ITERATIONS);
dt(RAN, 4096, 32, 64*1024, 8, 64, 1000, ITERATIONS);
dt(SEQGAP, 4096, 32, 64*1024, 8, 64, 1000, ITERATIONS);
dt(RANGAP, 4096, 32, 64*1024, 8, 64, 1000, ITERATIONS);
dt(DUMMY, 4096, 32, 8, 64, 1000, ITERATIONS);
dt(SEQ, 4096, 32, 8, 64, 1000, ITERATIONS);
dt(RAN, 4096, 32, 8, 64, 1000, ITERATIONS);
dt(SEQGAP, 4096, 32, 8, 64, 1000, ITERATIONS);
dt(RANGAP, 4096, 32, 8, 64, 1000, ITERATIONS);
dt(DUMMY, 4096, 1024, 64*1024, 100, 132, 1000, ITERATIONS);
dt(SEQ, 4096, 1024, 64*1024, 100, 132, 1000, ITERATIONS);
dt(RAN, 4096, 1024, 64*1024, 100, 132, 1000, ITERATIONS);
dt(SEQGAP, 4096, 1024, 64*1024, 100, 132, 1000, ITERATIONS);
dt(RANGAP, 4096, 1024, 64*1024, 100, 132, 1000, ITERATIONS);
dt(DUMMY, 4096, 1024, 100, 132, 1000, ITERATIONS);
dt(SEQ, 4096, 1024, 100, 132, 1000, ITERATIONS);
dt(RAN, 4096, 1024, 100, 132, 1000, ITERATIONS);
dt(SEQGAP, 4096, 1024, 100, 132, 1000, ITERATIONS);
dt(RANGAP, 4096, 1024, 100, 132, 1000, ITERATIONS);
dt(DUMMY, 128*1024, 64*1024, 6400*1024, mins, 128*1024, 100, ITERATIONS);
dt(SEQ, 128*1024, 64*1024, 6400*1024, mins, 128*1024, 100, ITERATIONS);
dt(RAN, 128*1024, 64*1024, 6400*1024, mins, 128*1024, 100, ITERATIONS);
dt(SEQGAP, 128*1024, 64*1024, 6400*1024, mins, 128*1024, 100, ITERATIONS);
dt(RANGAP, 128*1024, 64*1024, 6400*1024, mins, 128*1024, 100, ITERATIONS);
dt(DUMMY, 128*1024, 64*1024, mins, 128*1024, 100, ITERATIONS);
dt(SEQ, 128*1024, 64*1024, mins, 128*1024, 100, ITERATIONS);
dt(RAN, 128*1024, 64*1024, mins, 128*1024, 100, ITERATIONS);
dt(SEQGAP, 128*1024, 64*1024, mins, 128*1024, 100, ITERATIONS);
dt(RANGAP, 128*1024, 64*1024, mins, 128*1024, 100, ITERATIONS);
mps_thread_dereg(thread);
mps_arena_destroy(arena);

View file

@ -9,7 +9,7 @@ END_HEADER
*/
#include "testlib.h"
#include "mpscmv.h"
#include "mpscmvff.h"
static void test(void) {
mps_arena_t arena;
@ -19,9 +19,7 @@ static void test(void) {
die(mps_arena_create_k(&arena, mps_arena_class_vm(), mps_args_none), "create");
die(mps_pool_create(&pool, arena, mps_class_mv(),
(size_t)(32), (size_t)(16), (size_t)(256)),
"create MV pool");
cdie(mps_pool_create_k(&pool, arena, mps_class_mvff(), mps_args_none), "pool");
for (p=0; p<OBJECTS; p++) {
die(mps_alloc(&q, pool, 1024), "alloc");

View file

@ -9,7 +9,7 @@ END_HEADER
*/
#include "testlib.h"
#include "mpscmv.h"
#include "mpscmvff.h"
static void test(void) {
mps_arena_t arena;
@ -19,9 +19,7 @@ static void test(void) {
die(mps_arena_create_k(&arena, mps_arena_class_vm(), mps_args_none), "create");
die(mps_pool_create(&pool, arena, mps_class_mv(),
(size_t)(32), (size_t)(16), (size_t)(256)),
"create MV pool");
cdie(mps_pool_create_k(&pool, arena, mps_class_mvff(), mps_args_none), "pool");
die(mps_alloc(&q, pool, 1024), "alloc");

View file

@ -11,7 +11,7 @@ END_HEADER
#include "testlib.h"
#include "mpscawl.h"
#include "mpscmv.h"
#include "mpscmvff.h"
#include "mpscamc.h"
#include "mpsavm.h"
#include "rankfmt.h"
@ -71,7 +71,7 @@ static void blat(mps_ap_t apamc, unsigned percent) {
}
static void test(void) {
mps_pool_t poolmv, poolawl, poolamc;
mps_pool_t poolmvff, poolawl, poolamc;
mps_thr_t thread;
mps_root_t root0, root1, root2;
mps_addr_t p;
@ -112,9 +112,8 @@ static void test(void) {
mps_pool_create(&poolawl, arena, mps_class_awl(), format, getassociated),
"create awl pool");
cdie(mps_pool_create(&poolmv, arena, mps_class_mv(),
(size_t)0x4000, (size_t)128, (size_t)0x4000),
"create mv pool");
cdie(mps_pool_create_k(&poolmvff, arena, mps_class_mvff(), mps_args_none),
"create MVFF pool");
cdie(
mps_ap_create(&apawl, poolawl, mps_rank_exact()),
@ -135,9 +134,9 @@ static void test(void) {
*/
for (i=0; i < MAXLDS; i++) {
mps_alloc(&p, poolmv, sizeof(mps_ld_s));
mps_alloc(&p, poolmvff, sizeof(mps_ld_s));
lds[i] = (mps_ld_t) p;
mps_alloc(&p, poolmv, sizeof(mps_ld_s));
mps_alloc(&p, poolmvff, sizeof(mps_ld_s));
ldm[i] = (mps_ld_t) p;
}
@ -176,7 +175,7 @@ static void test(void) {
mps_ap_destroy(apamc);
comment("Destroyed aps.");
mps_pool_destroy(poolmv);
mps_pool_destroy(poolmvff);
mps_pool_destroy(poolamc);
mps_pool_destroy(poolawl);
comment("Destroyed pools.");

View file

@ -1,7 +1,7 @@
/*
TEST_HEADER
id = $Id$
summary = ensure allocation in MV pool causes collection
summary = ensure allocation in MVFF pool causes collection
language = c
link = newfmt.o testlib.o
OUTPUT_SPEC
@ -14,7 +14,7 @@ END_HEADER
*/
#include "testlib.h"
#include "mpscmv.h"
#include "mpscmvff.h"
#include "mpscamc.h"
#include "mpsavm.h"
#include "newfmt.h"
@ -34,7 +34,7 @@ void *stackpointer;
static void test(void)
{
mps_arena_t arena;
mps_pool_t poolMV, poolAMC;
mps_pool_t poolMVFF, poolAMC;
mps_thr_t thread;
mps_fmt_t format;
@ -67,33 +67,43 @@ static void test(void)
comment("Sizes in megabytes:");
die(mps_pool_create(&poolMV, arena, mps_class_mv(),
EXTEND_BY, MEAN_SIZE, MAX_SIZE),
"create MV pool");
MPS_ARGS_BEGIN(args) {
MPS_ARGS_ADD(args, MPS_KEY_EXTEND_BY, EXTEND_BY);
MPS_ARGS_ADD(args, MPS_KEY_MEAN_SIZE, MEAN_SIZE);
cdie(mps_pool_create_k(&poolMVFF, arena, mps_class_mvff(), args),
"create MVFF pool");
} MPS_ARGS_END(args);
i = 0;
while ((r=mps_alloc(&p, poolMV, 1024*1024)) == 0) i++;
while ((r=mps_alloc(&p, poolMVFF, 1024*1024)) == 0) i++;
report("refuse1", "%s", err_text(r));
report("size1", "%i", i);
s1 = i;
mps_pool_destroy(poolMV);
mps_pool_destroy(poolMVFF);
die(mps_pool_create(&poolMV, arena, mps_class_mv(),
EXTEND_BY, MEAN_SIZE, MAX_SIZE),
"create MV pool");
MPS_ARGS_BEGIN(args) {
MPS_ARGS_ADD(args, MPS_KEY_EXTEND_BY, EXTEND_BY);
MPS_ARGS_ADD(args, MPS_KEY_MEAN_SIZE, MEAN_SIZE);
cdie(mps_pool_create_k(&poolMVFF, arena, mps_class_mvff(), args),
"create MVFF pool");
} MPS_ARGS_END(args);
i = 0;
while ((r=mps_alloc(&p, poolMV, 1024*1024)) == 0) i++;
while ((r=mps_alloc(&p, poolMVFF, 1024*1024)) == 0) i++;
report("refuse2", "%s", err_text(r));
report("size2", "%i", i);
s2 = i;
mps_pool_destroy(poolMV);
mps_pool_destroy(poolMVFF);
a = allocdumb(ap, 1024*1024*30); /* allocate 30 M object */
die(mps_pool_create(&poolMV, arena, mps_class_mv(),
EXTEND_BY, MEAN_SIZE, MAX_SIZE),
"create MV pool");
MPS_ARGS_BEGIN(args) {
MPS_ARGS_ADD(args, MPS_KEY_EXTEND_BY, EXTEND_BY);
MPS_ARGS_ADD(args, MPS_KEY_MEAN_SIZE, MEAN_SIZE);
cdie(mps_pool_create_k(&poolMVFF, arena, mps_class_mvff(), args),
"create MVFF pool");
} MPS_ARGS_END(args);
i=0;
while ((r=mps_alloc(&p, poolMV, 1024*1024)) == 0) i++;
while ((r=mps_alloc(&p, poolMVFF, 1024*1024)) == 0) i++;
report("refuse3", "%s", err_text(r));
report("size3", "%i", i);
s3 = i;
@ -102,12 +112,12 @@ static void test(void)
report("diff23", "%i", s2-s3);
for(i = 0; i < 10; i++) {
r = mps_alloc(&p, poolMV, 1024*1024);
r = mps_alloc(&p, poolMVFF, 1024*1024);
report("refuse4", "%s", err_text(r));
}
mps_arena_park(arena);
mps_pool_destroy(poolMV);
mps_pool_destroy(poolMVFF);
mps_ap_destroy(ap);

View file

@ -10,7 +10,7 @@ END_HEADER
*/
#include "testlib.h"
#include "mpscmv.h"
#include "mpscmvff.h"
mps_arena_t arena;
mps_pool_t pool;
@ -19,9 +19,7 @@ mps_addr_t q;
static mps_res_t trysize(size_t try) {
mps_res_t res;
die(mps_pool_create(&pool, arena, mps_class_mv(),
(size_t)(1024*32), (size_t)(1024*16), (size_t)(1024*256)),
"pool_create");
cdie(mps_pool_create_k(&pool, arena, mps_class_mvff(), mps_args_none), "pool");
comment("Trying %x", try);

View file

@ -9,7 +9,7 @@ END_HEADER
#include "testlib.h"
#include "mpscawl.h"
#include "mpscmv.h"
#include "mpscmvff.h"
#include "mpscamc.h"
#include "mpsavm.h"
#include "rankfmt.h"
@ -52,7 +52,7 @@ static void checklds(void)
static void test(void)
{
mps_pool_t poolmv, poolawl, poolamc;
mps_pool_t poolmvff, poolawl, poolamc;
mps_thr_t thread;
mps_root_t root0, root1, root2;
@ -91,9 +91,8 @@ static void test(void)
cdie(mps_pool_create(&poolawl, arena, mps_class_awl(), format, getassociated),
"create awl pool");
cdie(mps_pool_create(&poolmv, arena, mps_class_mv(),
(size_t)0x4000, (size_t)128, (size_t)0x4000),
"create mv pool");
cdie(mps_pool_create_k(&poolmvff, arena, mps_class_mvff(), mps_args_none),
"create MVFF pool");
cdie(mps_ap_create(&apawl, poolawl, mps_rank_exact()),
"create ap");
@ -105,7 +104,7 @@ static void test(void)
for (i=0; i < MAXLDS; i++) {
comment("%d", i);
mps_alloc(&p, poolmv, sizeof(mps_ld_s));
mps_alloc(&p, poolmvff, sizeof(mps_ld_s));
a = allocone(apawl, 5, mps_rank_exact());
setref(a, 0, b);
b = a;
@ -155,7 +154,7 @@ static void test(void)
mps_arena_park(arena);
mps_ap_destroy(apawl);
mps_ap_destroy(apamc);
mps_pool_destroy(poolmv);
mps_pool_destroy(poolmvff);
mps_pool_destroy(poolamc);
mps_pool_destroy(poolawl);
comment("Destroyed pools.");

View file

@ -9,7 +9,7 @@ END_HEADER
#include "testlib.h"
#include "mpscawl.h"
#include "mpscmv.h"
#include "mpscmvff.h"
#include "mpscamc.h"
#include "mpsavm.h"
#include "rankfmt.h"
@ -22,7 +22,7 @@ void *stackpointer;
static void test(void) {
mps_arena_t arena;
mps_pool_t poolmv, poolawl;
mps_pool_t poolmvff, poolawl;
mps_thr_t thread;
mps_root_t root0, root1;
@ -54,9 +54,8 @@ static void test(void) {
cdie(mps_pool_create(&poolawl, arena, mps_class_awl(), format, getassociated),
"create awl pool");
cdie(mps_pool_create(&poolmv, arena, mps_class_mv(),
(size_t)0x4000, (size_t)128, (size_t)0x4000),
"create mv pool");
cdie(mps_pool_create_k(&poolmvff, arena, mps_class_mvff(), mps_args_none),
"create MVFF pool");
cdie(mps_ap_create(&apawl, poolawl, mps_rank_exact()),
"create ap");
@ -65,7 +64,7 @@ static void test(void) {
for (i=0; i < MAXLDS; i++) {
comment("%d", i);
mps_alloc(&p, poolmv, sizeof(mps_ld_s));
mps_alloc(&p, poolmvff, sizeof(mps_ld_s));
a = allocone(apawl, 5, mps_rank_exact());
setref(a, 0, b);
b = a;
@ -92,7 +91,7 @@ static void test(void) {
mps_ap_destroy(apawl);
comment("Destroyed ap.");
mps_pool_destroy(poolmv);
mps_pool_destroy(poolmvff);
mps_pool_destroy(poolawl);
comment("Destroyed pools.");

View file

@ -9,7 +9,7 @@ END_HEADER
#include "testlib.h"
#include "mpscawl.h"
#include "mpscmv.h"
#include "mpscmvff.h"
#include "mpscamc.h"
#include "rankfmt.h"
@ -44,7 +44,7 @@ static void checklds(void) {
}
static void test(void) {
mps_pool_t poolmv, poolawl, poolamc;
mps_pool_t poolmvff, poolawl, poolamc;
mps_thr_t thread;
mps_root_t root0, root1, root2;
@ -89,10 +89,8 @@ static void test(void) {
mps_pool_create(&poolawl, arena, mps_class_awl(), format, getassociated),
"create awl pool");
cdie(
mps_pool_create(&poolmv, arena, mps_class_mv(),
(size_t)0x4000, (size_t)128, (size_t)0x4000),
"create mv pool");
cdie(mps_pool_create_k(&poolmvff, arena, mps_class_mvff(), mps_args_none),
"create MVFF pool");
cdie(
mps_ap_create(&apawl, poolawl, mps_rank_exact()),
@ -116,7 +114,7 @@ static void test(void) {
for (i=0; i < MAXLDS; i++) {
comment("%d", i);
mps_alloc(&p, poolmv, sizeof(mps_ld_s));
mps_alloc(&p, poolmvff, sizeof(mps_ld_s));
a = allocone(apawl, 5, mps_rank_exact());
setref(a, 0, b);
b = a;
@ -161,7 +159,7 @@ static void test(void) {
mps_ap_destroy(apamc);
comment("Destroyed aps.");
mps_pool_destroy(poolmv);
mps_pool_destroy(poolmvff);
mps_pool_destroy(poolamc);
mps_pool_destroy(poolawl);
comment("Destroyed pools.");

View file

@ -1,7 +1,7 @@
/*
TEST_HEADER
id = $Id$
summary = low memory tests with AMC (and using MV)
summary = low memory tests with AMC (and using MVFF)
language = c
link = testlib.o rankfmt.o
END_HEADER
@ -9,7 +9,7 @@ END_HEADER
#include "testlib.h"
#include "mpscamc.h"
#include "mpscmv.h"
#include "mpscmvff.h"
#include "mpsavm.h"
#include "rankfmt.h"
@ -22,7 +22,7 @@ static mps_gen_param_s testChain[genCOUNT] = {
void *stackpointer;
mps_pool_t poolmv;
mps_pool_t poolmvff;
mps_arena_t arena;
@ -31,18 +31,17 @@ static void fillup(void)
size_t size;
mps_addr_t a;
die(mps_pool_create(&poolmv, arena, mps_class_mv(),
(size_t)64, (size_t)64, (size_t)64),
"create MV pool");
cdie(mps_pool_create_k(&poolmvff, arena, mps_class_mvff(), mps_args_none),
"create MVFF pool");
for (size=1024ul*1024ul; size >= 4096ul; size /= 2)
while (mps_alloc(&a, poolmv, size)==MPS_RES_OK)
while (mps_alloc(&a, poolmvff, size)==MPS_RES_OK)
;
}
static void empty(void)
{
mps_pool_destroy(poolmv);
mps_pool_destroy(poolmvff);
}