forked from osmocom/wireshark
Increase the work used to time wmem allocators
It appears that on some platforms the timer underlying g_test_timer() is relatively low-precision, so the small amount of work that we were previously doing was not enough for the timer to provide a useful value. Bumping the amount of work should provide more meaningful values, and the whole timing step still takes only a few seconds. Change-Id: Idce1386eaa33add845d9a2758b0beb72bbf370d6 Reviewed-on: https://code.wireshark.org/review/1523 Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
parent
542b4e6742
commit
f764765108
|
@ -352,12 +352,17 @@ wmem_time_allocator(wmem_allocator_type_t type)
|
|||
|
||||
allocator = wmem_allocator_force_new(type);
|
||||
|
||||
for (j=0; j<128; j++) {
|
||||
for (j=0; j<1024; j++) {
|
||||
for (i=0; i<MAX_SIMULTANEOUS_ALLOCS; i++) {
|
||||
wmem_alloc(allocator, 8);
|
||||
}
|
||||
wmem_free_all(allocator);
|
||||
|
||||
for (i=0; i<MAX_SIMULTANEOUS_ALLOCS; i++) {
|
||||
wmem_alloc(allocator, 32);
|
||||
}
|
||||
wmem_free_all(allocator);
|
||||
|
||||
for (i=0; i<MAX_SIMULTANEOUS_ALLOCS; i++) {
|
||||
wmem_alloc(allocator, 256);
|
||||
}
|
||||
|
@ -366,6 +371,7 @@ wmem_time_allocator(wmem_allocator_type_t type)
|
|||
for (i=0; i<MAX_SIMULTANEOUS_ALLOCS; i++) {
|
||||
wmem_alloc(allocator, 1024);
|
||||
}
|
||||
wmem_free_all(allocator);
|
||||
}
|
||||
|
||||
wmem_destroy_allocator(allocator);
|
||||
|
|
Loading…
Reference in New Issue