diff options
| author | David Lovemore | 2012-07-05 15:26:47 +0100 |
|---|---|---|
| committer | David Lovemore | 2012-07-05 15:26:47 +0100 |
| commit | d7dcaa4745dd417ab2df9facf8490dfd3b4c6b8b (patch) | |
| tree | ac44b1d05fda08dec2e56a2237a0f9d85fe8303f /mps/code | |
| parent | c395667fd7816db3c2309b3ee683c0f3130fff5d (diff) | |
| download | emacs-d7dcaa4745dd417ab2df9facf8490dfd3b4c6b8b.tar.gz emacs-d7dcaa4745dd417ab2df9facf8490dfd3b4c6b8b.zip | |
Update mv2test for 64-bit even though it is failing. varargs and alignment fixes.
Copied from Perforce
Change: 178561
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
| -rw-r--r-- | mps/code/mv2test.c | 9 |
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 | |||
| 193 | static mps_res_t make(mps_addr_t *p, mps_ap_t ap, size_t size) | 195 | static 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 | ||