aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/mv2test.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mps/code/mv2test.c b/mps/code/mv2test.c
index fc2f95ab435..b2f7fcf7ea8 100644
--- a/mps/code/mv2test.c
+++ b/mps/code/mv2test.c
@@ -190,12 +190,13 @@ static size_t randomSize(int i)
190#define TEST_SET_SIZE 1234 190#define TEST_SET_SIZE 1234
191#define TEST_LOOPS 27 191#define TEST_LOOPS 27
192 192
193#define alignUp(w, a) (((w) + (a) - 1) & ~((size_t)(a) - 1))
194
193static mps_res_t make(mps_addr_t *p, mps_ap_t ap, size_t size) 195static mps_res_t make(mps_addr_t *p, mps_ap_t ap, size_t size)
194{ 196{
195 mps_res_t res; 197 mps_res_t res;
196 198
197 /* --- align */ 199 size = alignUp(size, MPS_PF_ALIGN);
198 size = ((size+7)/8)*8;
199 200
200 do { 201 do {
201 MPS_RESERVE_BLOCK(res, *p, ap, size); 202 MPS_RESERVE_BLOCK(res, *p, ap, size);
@@ -298,7 +299,7 @@ static void stress_with_arena_class(mps_arena_class_t aclass)
298 die(mps_arena_create(&arena, aclass, testArenaSIZE), 299 die(mps_arena_create(&arena, aclass, testArenaSIZE),
299 "mps_arena_create"); 300 "mps_arena_create");
300 301
301 min = 8; 302 min = MPS_PF_ALIGN;
302 mean = 42; 303 mean = 42;
303 max = 8192; 304 max = 8192;
304 305
@@ -307,7 +308,7 @@ static void stress_with_arena_class(mps_arena_class_t aclass)
307 mean, /* median_size */ 308 mean, /* median_size */
308 max, /* maximum_size */ 309 max, /* maximum_size */
309 (mps_count_t)TEST_SET_SIZE/2, /* reserve_depth */ 310 (mps_count_t)TEST_SET_SIZE/2, /* reserve_depth */
310 30 /* fragmentation_limit */ 311 (mps_count_t)30 /* fragmentation_limit */
311 ), 312 ),
312 "stress MVT"); 313 "stress MVT");
313 314