diff options
author | Evan Huus <eapache@gmail.com> | 2014-05-04 18:23:08 -0400 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-05-04 22:24:44 +0000 |
commit | 19e650f43adf23b0aa92821bff0cc389643944f6 (patch) | |
tree | 23b002ada4ab6ef00186238661c464218b4452cd /epan/wmem | |
parent | 6c7ab457ea526fac427b6a8fbfd6f98f9bd1b537 (diff) |
Fuzz fewer iterations of the fast block allocator
I believe the XP buildbot failures are simply running out of memory, so
hopefully reducing the number of iterations should be enough to let it finish
reliably.
Change-Id: I40af789d528c2623e95f153529205b5e617c6e02
Reviewed-on: https://code.wireshark.org/review/1496
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/wmem')
-rw-r--r-- | epan/wmem/wmem_test.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/epan/wmem/wmem_test.c b/epan/wmem/wmem_test.c index e8606f4c63..cf4df082a0 100644 --- a/epan/wmem/wmem_test.c +++ b/epan/wmem/wmem_test.c @@ -268,7 +268,8 @@ wmem_test_allocator_jumbo(wmem_allocator_type_t type, wmem_verify_func verify) } static void -wmem_test_allocator(wmem_allocator_type_t type, wmem_verify_func verify) +wmem_test_allocator(wmem_allocator_type_t type, wmem_verify_func verify, + int iterations) { int i; char *ptrs[MAX_SIMULTANEOUS_ALLOCS]; @@ -303,7 +304,7 @@ wmem_test_allocator(wmem_allocator_type_t type, wmem_verify_func verify) } /* Run enough iterations to fill the array 32 times */ - for (i=0; i<MAX_SIMULTANEOUS_ALLOCS*32; i++) { + for (i=0; i<iterations; i++) { gint ptrs_index; gint new_size; @@ -397,27 +398,31 @@ wmem_time_allocators(void) static void wmem_test_allocator_block(void) { - wmem_test_allocator(WMEM_ALLOCATOR_BLOCK, &wmem_block_verify); + wmem_test_allocator(WMEM_ALLOCATOR_BLOCK, &wmem_block_verify, + MAX_SIMULTANEOUS_ALLOCS*64); wmem_test_allocator_jumbo(WMEM_ALLOCATOR_BLOCK, &wmem_block_verify); } static void wmem_test_allocator_block_fast(void) { - wmem_test_allocator(WMEM_ALLOCATOR_BLOCK_FAST, NULL); + wmem_test_allocator(WMEM_ALLOCATOR_BLOCK_FAST, NULL, + MAX_SIMULTANEOUS_ALLOCS*16); } static void wmem_test_allocator_simple(void) { - wmem_test_allocator(WMEM_ALLOCATOR_SIMPLE, NULL); + wmem_test_allocator(WMEM_ALLOCATOR_SIMPLE, NULL, + MAX_SIMULTANEOUS_ALLOCS*64); wmem_test_allocator_jumbo(WMEM_ALLOCATOR_SIMPLE, NULL); } static void wmem_test_allocator_strict(void) { - wmem_test_allocator(WMEM_ALLOCATOR_STRICT, &wmem_strict_check_canaries); + wmem_test_allocator(WMEM_ALLOCATOR_STRICT, &wmem_strict_check_canaries, + MAX_SIMULTANEOUS_ALLOCS*64); wmem_test_allocator_jumbo(WMEM_ALLOCATOR_STRICT, &wmem_strict_check_canaries); } |