@@ -305,7 +305,6 @@ pt_chi2(double p, double df, double ln_gamma_df_2)
|
||||
JEMALLOC_INLINE double
|
||||
pt_gamma(double p, double shape, double scale, double ln_gamma_shape)
|
||||
{
|
||||
|
||||
return (pt_chi2(p, shape * 2.0, ln_gamma_shape) * 0.5 * scale);
|
||||
}
|
||||
#endif
|
||||
|
@@ -46,7 +46,6 @@ a_prefix##init(a_mq_type *mq) { \
|
||||
a_attr void \
|
||||
a_prefix##fini(a_mq_type *mq) \
|
||||
{ \
|
||||
\
|
||||
mtx_fini(&mq->lock); \
|
||||
} \
|
||||
a_attr unsigned \
|
||||
|
@@ -63,7 +63,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_MALLOCX_ARENA));
|
||||
}
|
||||
|
@@ -10,7 +10,6 @@
|
||||
static void
|
||||
purge(void)
|
||||
{
|
||||
|
||||
assert_d_eq(mallctl("arena.0.purge", NULL, NULL, NULL, 0), 0,
|
||||
"Unexpected mallctl error");
|
||||
}
|
||||
@@ -130,7 +129,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_alignment_errors,
|
||||
test_oom_errors,
|
||||
|
@@ -98,7 +98,6 @@ label_ENOENT:
|
||||
|
||||
TEST_BEGIN(test_main_thread)
|
||||
{
|
||||
|
||||
thd_start(NULL);
|
||||
}
|
||||
TEST_END
|
||||
@@ -115,7 +114,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
/* Run tests multiple times to check for bad interactions. */
|
||||
return (test(
|
||||
test_main_thread,
|
||||
|
@@ -12,7 +12,6 @@ TEST_END
|
||||
int
|
||||
main()
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_basic));
|
||||
}
|
||||
|
@@ -176,7 +176,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_extent_manual_hook,
|
||||
test_extent_auto_hook));
|
||||
|
@@ -20,7 +20,6 @@ get_nsizes_impl(const char *cmd)
|
||||
static unsigned
|
||||
get_nlarge(void)
|
||||
{
|
||||
|
||||
return (get_nsizes_impl("arenas.nlextents"));
|
||||
}
|
||||
|
||||
@@ -46,7 +45,6 @@ get_size_impl(const char *cmd, size_t ind)
|
||||
static size_t
|
||||
get_large_size(size_t ind)
|
||||
{
|
||||
|
||||
return (get_size_impl("arenas.lextent.0.size", ind));
|
||||
}
|
||||
|
||||
@@ -58,7 +56,6 @@ get_large_size(size_t ind)
|
||||
static void
|
||||
purge(void)
|
||||
{
|
||||
|
||||
assert_d_eq(mallctl("arena.0.purge", NULL, NULL, NULL, 0), 0,
|
||||
"Unexpected mallctl error");
|
||||
}
|
||||
@@ -225,7 +222,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_overflow,
|
||||
test_oom,
|
||||
|
@@ -43,7 +43,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_overflow));
|
||||
}
|
||||
|
@@ -10,7 +10,6 @@
|
||||
static void
|
||||
purge(void)
|
||||
{
|
||||
|
||||
assert_d_eq(mallctl("arena.0.purge", NULL, NULL, NULL, 0), 0,
|
||||
"Unexpected mallctl error");
|
||||
}
|
||||
@@ -124,7 +123,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_alignment_errors,
|
||||
test_oom_errors,
|
||||
|
@@ -16,7 +16,6 @@ get_nsizes_impl(const char *cmd)
|
||||
static unsigned
|
||||
get_nlarge(void)
|
||||
{
|
||||
|
||||
return (get_nsizes_impl("arenas.nlextents"));
|
||||
}
|
||||
|
||||
@@ -42,7 +41,6 @@ get_size_impl(const char *cmd, size_t ind)
|
||||
static size_t
|
||||
get_large_size(size_t ind)
|
||||
{
|
||||
|
||||
return (get_size_impl("arenas.lextent.0.size", ind));
|
||||
}
|
||||
|
||||
@@ -249,7 +247,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_grow_and_shrink,
|
||||
test_zero,
|
||||
|
@@ -50,7 +50,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_basic,
|
||||
test_alignment_and_size));
|
||||
|
@@ -75,7 +75,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_thread_arena));
|
||||
}
|
||||
|
@@ -86,7 +86,6 @@ label_ENOENT:
|
||||
|
||||
TEST_BEGIN(test_main_thread)
|
||||
{
|
||||
|
||||
thd_start(NULL);
|
||||
}
|
||||
TEST_END
|
||||
@@ -103,7 +102,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
/* Run tests multiple times to check for bad interactions. */
|
||||
return (test(
|
||||
test_main_thread,
|
||||
|
@@ -87,14 +87,12 @@ get_nsizes_impl(const char *cmd)
|
||||
static unsigned
|
||||
get_nsmall(void)
|
||||
{
|
||||
|
||||
return (get_nsizes_impl("arenas.nbins"));
|
||||
}
|
||||
|
||||
static unsigned
|
||||
get_nlarge(void)
|
||||
{
|
||||
|
||||
return (get_nsizes_impl("arenas.nlextents"));
|
||||
}
|
||||
|
||||
@@ -120,14 +118,12 @@ get_size_impl(const char *cmd, size_t ind)
|
||||
static size_t
|
||||
get_small_size(size_t ind)
|
||||
{
|
||||
|
||||
return (get_size_impl("arenas.bin.0.size", ind));
|
||||
}
|
||||
|
||||
static size_t
|
||||
get_large_size(size_t ind)
|
||||
{
|
||||
|
||||
return (get_size_impl("arenas.lextent.0.size", ind));
|
||||
}
|
||||
|
||||
@@ -397,7 +393,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_same_size,
|
||||
test_extra_no_move,
|
||||
|
@@ -3,6 +3,5 @@
|
||||
void *
|
||||
btalloc(size_t size, unsigned bits)
|
||||
{
|
||||
|
||||
return (btalloc_0(size, bits));
|
||||
}
|
||||
|
@@ -7,7 +7,6 @@
|
||||
void
|
||||
mq_nanosleep(unsigned ns)
|
||||
{
|
||||
|
||||
assert(ns <= 1000*1000*1000);
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@@ -7,7 +7,6 @@
|
||||
bool
|
||||
mtx_init(mtx_t *mtx)
|
||||
{
|
||||
|
||||
#ifdef _WIN32
|
||||
if (!InitializeCriticalSectionAndSpinCount(&mtx->lock, _CRT_SPINCOUNT))
|
||||
return (true);
|
||||
@@ -33,7 +32,6 @@ mtx_init(mtx_t *mtx)
|
||||
void
|
||||
mtx_fini(mtx_t *mtx)
|
||||
{
|
||||
|
||||
#ifdef _WIN32
|
||||
#elif (defined(JEMALLOC_OS_UNFAIR_LOCK))
|
||||
#elif (defined(JEMALLOC_OSSPIN))
|
||||
@@ -45,7 +43,6 @@ mtx_fini(mtx_t *mtx)
|
||||
void
|
||||
mtx_lock(mtx_t *mtx)
|
||||
{
|
||||
|
||||
#ifdef _WIN32
|
||||
EnterCriticalSection(&mtx->lock);
|
||||
#elif (defined(JEMALLOC_OS_UNFAIR_LOCK))
|
||||
@@ -60,7 +57,6 @@ mtx_lock(mtx_t *mtx)
|
||||
void
|
||||
mtx_unlock(mtx_t *mtx)
|
||||
{
|
||||
|
||||
#ifdef _WIN32
|
||||
LeaveCriticalSection(&mtx->lock);
|
||||
#elif (defined(JEMALLOC_OS_UNFAIR_LOCK))
|
||||
|
@@ -34,7 +34,6 @@ test_fail(const char *format, ...)
|
||||
static const char *
|
||||
test_status_string(test_status_t test_status)
|
||||
{
|
||||
|
||||
switch (test_status) {
|
||||
case test_status_pass: return "pass";
|
||||
case test_status_skip: return "skip";
|
||||
@@ -46,7 +45,6 @@ test_status_string(test_status_t test_status)
|
||||
void
|
||||
p_test_init(const char *name)
|
||||
{
|
||||
|
||||
test_count++;
|
||||
test_status = test_status_pass;
|
||||
test_name = name;
|
||||
@@ -55,7 +53,6 @@ p_test_init(const char *name)
|
||||
void
|
||||
p_test_fini(void)
|
||||
{
|
||||
|
||||
test_counts[test_status]++;
|
||||
malloc_printf("%s: %s\n", test_name, test_status_string(test_status));
|
||||
}
|
||||
@@ -127,7 +124,6 @@ p_test_no_malloc_init(test_t *t, ...)
|
||||
void
|
||||
p_test_fail(const char *prefix, const char *message)
|
||||
{
|
||||
|
||||
malloc_cprintf(NULL, NULL, "%s%s\n", prefix, message);
|
||||
test_status = test_status_fail;
|
||||
}
|
||||
|
@@ -13,7 +13,6 @@ thd_create(thd_t *thd, void *(*proc)(void *), void *arg)
|
||||
void
|
||||
thd_join(thd_t thd, void **ret)
|
||||
{
|
||||
|
||||
if (WaitForSingleObject(thd, INFINITE) == WAIT_OBJECT_0 && ret) {
|
||||
DWORD exit_code;
|
||||
GetExitCodeThread(thd, (LPDWORD) &exit_code);
|
||||
@@ -25,7 +24,6 @@ thd_join(thd_t thd, void **ret)
|
||||
void
|
||||
thd_create(thd_t *thd, void *(*proc)(void *), void *arg)
|
||||
{
|
||||
|
||||
if (pthread_create(thd, NULL, proc, arg) != 0)
|
||||
test_fail("Error in pthread_create()\n");
|
||||
}
|
||||
@@ -33,7 +31,6 @@ thd_create(thd_t *thd, void *(*proc)(void *), void *arg)
|
||||
void
|
||||
thd_join(thd_t thd, void **ret)
|
||||
{
|
||||
|
||||
pthread_join(thd, ret);
|
||||
}
|
||||
#endif
|
||||
|
@@ -3,7 +3,6 @@
|
||||
void
|
||||
timer_start(timedelta_t *timer)
|
||||
{
|
||||
|
||||
nstime_init(&timer->t0, 0);
|
||||
nstime_update(&timer->t0);
|
||||
}
|
||||
@@ -11,7 +10,6 @@ timer_start(timedelta_t *timer)
|
||||
void
|
||||
timer_stop(timedelta_t *timer)
|
||||
{
|
||||
|
||||
nstime_copy(&timer->t1, &timer->t0);
|
||||
nstime_update(&timer->t1);
|
||||
}
|
||||
|
@@ -65,7 +65,6 @@ mallocx_free(void)
|
||||
|
||||
TEST_BEGIN(test_malloc_vs_mallocx)
|
||||
{
|
||||
|
||||
compare_funcs(10*1000*1000, 100*1000*1000, "malloc",
|
||||
malloc_free, "mallocx", mallocx_free);
|
||||
}
|
||||
@@ -95,7 +94,6 @@ malloc_sdallocx(void)
|
||||
|
||||
TEST_BEGIN(test_free_vs_dallocx)
|
||||
{
|
||||
|
||||
compare_funcs(10*1000*1000, 100*1000*1000, "free", malloc_free,
|
||||
"dallocx", malloc_dallocx);
|
||||
}
|
||||
@@ -103,7 +101,6 @@ TEST_END
|
||||
|
||||
TEST_BEGIN(test_dallocx_vs_sdallocx)
|
||||
{
|
||||
|
||||
compare_funcs(10*1000*1000, 100*1000*1000, "dallocx", malloc_dallocx,
|
||||
"sdallocx", malloc_sdallocx);
|
||||
}
|
||||
@@ -140,7 +137,6 @@ malloc_sallocx_free(void)
|
||||
|
||||
TEST_BEGIN(test_mus_vs_sallocx)
|
||||
{
|
||||
|
||||
compare_funcs(10*1000*1000, 100*1000*1000, "malloc_usable_size",
|
||||
malloc_mus_free, "sallocx", malloc_sallocx_free);
|
||||
}
|
||||
@@ -163,7 +159,6 @@ malloc_nallocx_free(void)
|
||||
|
||||
TEST_BEGIN(test_sallocx_vs_nallocx)
|
||||
{
|
||||
|
||||
compare_funcs(10*1000*1000, 100*1000*1000, "sallocx",
|
||||
malloc_sallocx_free, "nallocx", malloc_nallocx_free);
|
||||
}
|
||||
@@ -172,7 +167,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_malloc_vs_mallocx,
|
||||
test_free_vs_dallocx,
|
||||
|
@@ -1596,7 +1596,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_gen_rand_32,
|
||||
test_by_array_32,
|
||||
|
@@ -13,7 +13,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test_no_malloc_init(
|
||||
test_a0));
|
||||
}
|
||||
|
@@ -20,14 +20,12 @@ get_nsizes_impl(const char *cmd)
|
||||
static unsigned
|
||||
get_nsmall(void)
|
||||
{
|
||||
|
||||
return (get_nsizes_impl("arenas.nbins"));
|
||||
}
|
||||
|
||||
static unsigned
|
||||
get_nlarge(void)
|
||||
{
|
||||
|
||||
return (get_nsizes_impl("arenas.nlextents"));
|
||||
}
|
||||
|
||||
@@ -53,14 +51,12 @@ get_size_impl(const char *cmd, size_t ind)
|
||||
static size_t
|
||||
get_small_size(size_t ind)
|
||||
{
|
||||
|
||||
return (get_size_impl("arenas.bin.0.size", ind));
|
||||
}
|
||||
|
||||
static size_t
|
||||
get_large_size(size_t ind)
|
||||
{
|
||||
|
||||
return (get_size_impl("arenas.lextent.0.size", ind));
|
||||
}
|
||||
|
||||
@@ -164,14 +160,12 @@ do_arena_reset_destroy(const char *name, unsigned arena_ind)
|
||||
static void
|
||||
do_arena_reset(unsigned arena_ind)
|
||||
{
|
||||
|
||||
do_arena_reset_destroy("arena.0.reset", arena_ind);
|
||||
}
|
||||
|
||||
static void
|
||||
do_arena_destroy(unsigned arena_ind)
|
||||
{
|
||||
|
||||
do_arena_reset_destroy("arena.0.destroy", arena_ind);
|
||||
}
|
||||
|
||||
@@ -214,7 +208,6 @@ arena_i_initialized(unsigned arena_ind, bool refresh)
|
||||
|
||||
TEST_BEGIN(test_arena_destroy_initial)
|
||||
{
|
||||
|
||||
assert_false(arena_i_initialized(MALLCTL_ARENAS_DESTROYED, false),
|
||||
"Destroyed arena stats should not be initialized");
|
||||
}
|
||||
@@ -269,7 +262,6 @@ static bool
|
||||
extent_dalloc_unmap(extent_hooks_t *extent_hooks, void *addr, size_t size,
|
||||
bool committed, unsigned arena_ind)
|
||||
{
|
||||
|
||||
TRACE_HOOK("%s(extent_hooks=%p, addr=%p, size=%zu, committed=%s, "
|
||||
"arena_ind=%u)\n", __func__, extent_hooks, addr, size, committed ?
|
||||
"true" : "false", arena_ind);
|
||||
@@ -338,7 +330,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_arena_reset,
|
||||
test_arena_destroy_initial,
|
||||
|
@@ -68,7 +68,6 @@ typedef struct p##_test_s p##_test_t;
|
||||
TEST_STRUCT(u64, uint64_t)
|
||||
TEST_BEGIN(test_atomic_u64)
|
||||
{
|
||||
|
||||
#if !(LG_SIZEOF_PTR == 3 || LG_SIZEOF_INT == 3)
|
||||
test_skip("64-bit atomic operations not supported");
|
||||
#else
|
||||
@@ -80,7 +79,6 @@ TEST_END
|
||||
TEST_STRUCT(u32, uint32_t)
|
||||
TEST_BEGIN(test_atomic_u32)
|
||||
{
|
||||
|
||||
TEST_BODY(u32, uint32_t, uint32_t, u32, "#"FMTx32);
|
||||
}
|
||||
TEST_END
|
||||
@@ -88,7 +86,6 @@ TEST_END
|
||||
TEST_STRUCT(p, void *)
|
||||
TEST_BEGIN(test_atomic_p)
|
||||
{
|
||||
|
||||
TEST_BODY(p, void *, uintptr_t, ptr, "p");
|
||||
}
|
||||
TEST_END
|
||||
@@ -96,7 +93,6 @@ TEST_END
|
||||
TEST_STRUCT(zu, size_t)
|
||||
TEST_BEGIN(test_atomic_zu)
|
||||
{
|
||||
|
||||
TEST_BODY(zu, size_t, size_t, zu, "#zx");
|
||||
}
|
||||
TEST_END
|
||||
@@ -104,7 +100,6 @@ TEST_END
|
||||
TEST_STRUCT(u, unsigned)
|
||||
TEST_BEGIN(test_atomic_u)
|
||||
{
|
||||
|
||||
TEST_BODY(u, unsigned, unsigned, u, "#x");
|
||||
}
|
||||
TEST_END
|
||||
@@ -112,7 +107,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_atomic_u64,
|
||||
test_atomic_u32,
|
||||
|
@@ -208,7 +208,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_base_hooks_default,
|
||||
test_base_hooks_null,
|
||||
|
@@ -126,7 +126,6 @@ test_bitmap_initializer_body(const bitmap_info_t *binfo, size_t nbits)
|
||||
|
||||
TEST_BEGIN(test_bitmap_initializer)
|
||||
{
|
||||
|
||||
#define NB(nbits) { \
|
||||
if (nbits <= BITMAP_MAXBITS) { \
|
||||
bitmap_info_t binfo = \
|
||||
@@ -339,7 +338,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_bitmap_initializer,
|
||||
test_bitmap_size,
|
||||
|
@@ -206,7 +206,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_new_delete,
|
||||
test_count_insert_search_remove,
|
||||
|
@@ -12,14 +12,12 @@ static bool monotonic_mock;
|
||||
static bool
|
||||
nstime_monotonic_mock(void)
|
||||
{
|
||||
|
||||
return (monotonic_mock);
|
||||
}
|
||||
|
||||
static bool
|
||||
nstime_update_mock(nstime_t *time)
|
||||
{
|
||||
|
||||
nupdates_mock++;
|
||||
if (monotonic_mock)
|
||||
nstime_copy(time, &time_mock);
|
||||
@@ -357,7 +355,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_decay_ticks,
|
||||
test_decay_ticker,
|
||||
|
@@ -138,7 +138,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_small_extent_size,
|
||||
test_large_extent_size,
|
||||
|
@@ -58,7 +58,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_fork));
|
||||
}
|
||||
|
@@ -38,7 +38,6 @@ typedef enum {
|
||||
static int
|
||||
hash_variant_bits(hash_variant_t variant)
|
||||
{
|
||||
|
||||
switch (variant) {
|
||||
case hash_variant_x86_32: return (32);
|
||||
case hash_variant_x86_128: return (128);
|
||||
@@ -50,7 +49,6 @@ hash_variant_bits(hash_variant_t variant)
|
||||
static const char *
|
||||
hash_variant_string(hash_variant_t variant)
|
||||
{
|
||||
|
||||
switch (variant) {
|
||||
case hash_variant_x86_32: return ("hash_x86_32");
|
||||
case hash_variant_x86_128: return ("hash_x86_128");
|
||||
@@ -155,21 +153,18 @@ hash_variant_verify(hash_variant_t variant)
|
||||
|
||||
TEST_BEGIN(test_hash_x86_32)
|
||||
{
|
||||
|
||||
hash_variant_verify(hash_variant_x86_32);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_hash_x86_128)
|
||||
{
|
||||
|
||||
hash_variant_verify(hash_variant_x86_128);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_hash_x64_128)
|
||||
{
|
||||
|
||||
hash_variant_verify(hash_variant_x64_128);
|
||||
}
|
||||
TEST_END
|
||||
@@ -177,7 +172,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_hash_x86_32,
|
||||
test_hash_x86_128,
|
||||
|
@@ -17,7 +17,6 @@ static bool saw_junking;
|
||||
static void
|
||||
watch_junking(void *p)
|
||||
{
|
||||
|
||||
watch_for_junking = p;
|
||||
saw_junking = false;
|
||||
}
|
||||
@@ -55,7 +54,6 @@ large_dalloc_junk_intercept(void *ptr, size_t usize)
|
||||
static void
|
||||
large_dalloc_maybe_junk_intercept(void *ptr, size_t usize)
|
||||
{
|
||||
|
||||
large_dalloc_maybe_junk_orig(ptr, usize);
|
||||
if (ptr == watch_for_junking)
|
||||
saw_junking = true;
|
||||
@@ -130,7 +128,6 @@ test_junk(size_t sz_min, size_t sz_max)
|
||||
|
||||
TEST_BEGIN(test_junk_small)
|
||||
{
|
||||
|
||||
test_skip_if(!config_fill);
|
||||
test_junk(1, SMALL_MAXCLASS-1);
|
||||
}
|
||||
@@ -138,7 +135,6 @@ TEST_END
|
||||
|
||||
TEST_BEGIN(test_junk_large)
|
||||
{
|
||||
|
||||
test_skip_if(!config_fill);
|
||||
test_junk(SMALL_MAXCLASS+1, (1U << (LG_LARGE_MINCLASS+1)));
|
||||
}
|
||||
@@ -147,7 +143,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_junk_small,
|
||||
test_junk_large));
|
||||
|
@@ -121,7 +121,6 @@ TEST_END
|
||||
|
||||
TEST_BEGIN(test_mallctl_config)
|
||||
{
|
||||
|
||||
#define TEST_MALLCTL_CONFIG(config, t) do { \
|
||||
t oldval; \
|
||||
size_t sz = sizeof(oldval); \
|
||||
@@ -551,7 +550,6 @@ TEST_END
|
||||
|
||||
TEST_BEGIN(test_arenas_constants)
|
||||
{
|
||||
|
||||
#define TEST_ARENAS_CONSTANT(t, name, expected) do { \
|
||||
t name; \
|
||||
size_t sz = sizeof(t); \
|
||||
@@ -571,7 +569,6 @@ TEST_END
|
||||
|
||||
TEST_BEGIN(test_arenas_bin_constants)
|
||||
{
|
||||
|
||||
#define TEST_ARENAS_BIN_CONSTANT(t, name, expected) do { \
|
||||
t name; \
|
||||
size_t sz = sizeof(t); \
|
||||
@@ -591,7 +588,6 @@ TEST_END
|
||||
|
||||
TEST_BEGIN(test_arenas_lextent_constants)
|
||||
{
|
||||
|
||||
#define TEST_ARENAS_LEXTENT_CONSTANT(t, name, expected) do { \
|
||||
t name; \
|
||||
size_t sz = sizeof(t); \
|
||||
@@ -626,7 +622,6 @@ TEST_END
|
||||
|
||||
TEST_BEGIN(test_stats_arenas)
|
||||
{
|
||||
|
||||
#define TEST_STATS_ARENAS(t, name) do { \
|
||||
t name; \
|
||||
size_t sz = sizeof(t); \
|
||||
@@ -647,7 +642,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_mallctl_errors,
|
||||
test_mallctlnametomib_errors,
|
||||
|
@@ -387,7 +387,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_ln_gamma_factorial,
|
||||
test_ln_gamma_misc,
|
||||
|
@@ -85,7 +85,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_mq_basic,
|
||||
test_mq_threaded));
|
||||
|
@@ -53,7 +53,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_mtx_basic,
|
||||
test_mtx_race));
|
||||
|
@@ -178,7 +178,6 @@ TEST_END
|
||||
|
||||
TEST_BEGIN(test_nstime_monotonic)
|
||||
{
|
||||
|
||||
nstime_monotonic();
|
||||
}
|
||||
TEST_END
|
||||
@@ -211,7 +210,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_nstime_init,
|
||||
test_nstime_init2,
|
||||
|
@@ -161,7 +161,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_pack));
|
||||
}
|
||||
|
@@ -24,7 +24,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_pages_huge));
|
||||
}
|
||||
|
@@ -148,7 +148,6 @@ TEST_END
|
||||
static void
|
||||
node_remove(heap_t *heap, node_t *node)
|
||||
{
|
||||
|
||||
heap_remove(heap, node);
|
||||
|
||||
node->magic = 0;
|
||||
@@ -283,7 +282,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_ph_empty,
|
||||
test_ph_random));
|
||||
|
@@ -114,35 +114,30 @@ test_prng_lg_range_zu(bool atomic)
|
||||
|
||||
TEST_BEGIN(test_prng_lg_range_u32_nonatomic)
|
||||
{
|
||||
|
||||
test_prng_lg_range_u32(false);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_prng_lg_range_u32_atomic)
|
||||
{
|
||||
|
||||
test_prng_lg_range_u32(true);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_prng_lg_range_u64_nonatomic)
|
||||
{
|
||||
|
||||
test_prng_lg_range_u64();
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_prng_lg_range_zu_nonatomic)
|
||||
{
|
||||
|
||||
test_prng_lg_range_zu(false);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_prng_lg_range_zu_atomic)
|
||||
{
|
||||
|
||||
test_prng_lg_range_zu(true);
|
||||
}
|
||||
TEST_END
|
||||
@@ -212,35 +207,30 @@ test_prng_range_zu(bool atomic)
|
||||
|
||||
TEST_BEGIN(test_prng_range_u32_nonatomic)
|
||||
{
|
||||
|
||||
test_prng_range_u32(false);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_prng_range_u32_atomic)
|
||||
{
|
||||
|
||||
test_prng_range_u32(true);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_prng_range_u64_nonatomic)
|
||||
{
|
||||
|
||||
test_prng_range_u64();
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_prng_range_zu_nonatomic)
|
||||
{
|
||||
|
||||
test_prng_range_zu(false);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_prng_range_zu_atomic)
|
||||
{
|
||||
|
||||
test_prng_range_zu(true);
|
||||
}
|
||||
TEST_END
|
||||
@@ -248,7 +238,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_prng_lg_range_u32_nonatomic,
|
||||
test_prng_lg_range_u32_atomic,
|
||||
|
@@ -24,7 +24,6 @@ prof_dump_open_intercept(bool propagate_err, const char *filename)
|
||||
static void *
|
||||
alloc_from_permuted_backtrace(unsigned thd_ind, unsigned iteration)
|
||||
{
|
||||
|
||||
return (btalloc(1, thd_ind*NALLOCS_PER_THREAD + iteration));
|
||||
}
|
||||
|
||||
@@ -86,7 +85,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_idump));
|
||||
}
|
||||
|
@@ -38,7 +38,6 @@ static void
|
||||
mallctl_prof_active_get_impl(bool prof_active_old_expected, const char *func,
|
||||
int line)
|
||||
{
|
||||
|
||||
mallctl_bool_get("prof.active", prof_active_old_expected, func, line);
|
||||
}
|
||||
#define mallctl_prof_active_get(a) \
|
||||
@@ -48,7 +47,6 @@ static void
|
||||
mallctl_prof_active_set_impl(bool prof_active_old_expected,
|
||||
bool prof_active_new, const char *func, int line)
|
||||
{
|
||||
|
||||
mallctl_bool_set("prof.active", prof_active_old_expected,
|
||||
prof_active_new, func, line);
|
||||
}
|
||||
@@ -59,7 +57,6 @@ static void
|
||||
mallctl_thread_prof_active_get_impl(bool thread_prof_active_old_expected,
|
||||
const char *func, int line)
|
||||
{
|
||||
|
||||
mallctl_bool_get("thread.prof.active", thread_prof_active_old_expected,
|
||||
func, line);
|
||||
}
|
||||
@@ -70,7 +67,6 @@ static void
|
||||
mallctl_thread_prof_active_set_impl(bool thread_prof_active_old_expected,
|
||||
bool thread_prof_active_new, const char *func, int line)
|
||||
{
|
||||
|
||||
mallctl_bool_set("thread.prof.active", thread_prof_active_old_expected,
|
||||
thread_prof_active_new, func, line);
|
||||
}
|
||||
@@ -96,7 +92,6 @@ prof_sampling_probe_impl(bool expect_sample, const char *func, int line)
|
||||
|
||||
TEST_BEGIN(test_prof_active)
|
||||
{
|
||||
|
||||
test_skip_if(!config_prof);
|
||||
|
||||
mallctl_prof_active_get(true);
|
||||
@@ -131,7 +126,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_prof_active));
|
||||
}
|
||||
|
@@ -76,7 +76,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_gdump));
|
||||
}
|
||||
|
@@ -53,7 +53,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_idump));
|
||||
}
|
||||
|
@@ -19,7 +19,6 @@ prof_dump_open_intercept(bool propagate_err, const char *filename)
|
||||
static void
|
||||
set_prof_active(bool active)
|
||||
{
|
||||
|
||||
assert_d_eq(mallctl("prof.active", NULL, NULL, (void *)&active,
|
||||
sizeof(active)), 0, "Unexpected mallctl failure");
|
||||
}
|
||||
@@ -98,7 +97,6 @@ static bool
|
||||
prof_dump_header_intercept(tsdn_t *tsdn, bool propagate_err,
|
||||
const prof_cnt_t *cnt_all)
|
||||
{
|
||||
|
||||
prof_dump_header_intercepted = true;
|
||||
memcpy(&cnt_all_copy, cnt_all, sizeof(prof_cnt_t));
|
||||
|
||||
@@ -292,7 +290,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
/* Intercept dumping prior to running any tests. */
|
||||
prof_dump_open = prof_dump_open_intercept;
|
||||
|
||||
|
@@ -26,7 +26,6 @@ static void
|
||||
mallctl_thread_name_set_impl(const char *thread_name, const char *func,
|
||||
int line)
|
||||
{
|
||||
|
||||
assert_d_eq(mallctl("thread.prof.name", NULL, NULL,
|
||||
(void *)&thread_name, sizeof(thread_name)), 0,
|
||||
"%s():%d: Unexpected mallctl failure reading thread.prof.name",
|
||||
@@ -124,7 +123,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_prof_thread_name_validation,
|
||||
test_prof_thread_name_threaded));
|
||||
|
@@ -198,7 +198,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_ql_empty,
|
||||
test_ql_tail_insert,
|
||||
|
@@ -238,7 +238,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_qr_one,
|
||||
test_qr_after_insert,
|
||||
|
@@ -347,7 +347,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_rb_empty,
|
||||
test_rb_random));
|
||||
|
@@ -24,7 +24,6 @@ rtree_node_alloc_intercept(tsdn_t *tsdn, rtree_t *rtree, size_t nelms)
|
||||
static void
|
||||
rtree_node_dalloc_intercept(tsdn_t *tsdn, rtree_t *rtree, rtree_elm_t *node)
|
||||
{
|
||||
|
||||
if (rtree != test_rtree) {
|
||||
rtree_node_dalloc_orig(tsdn, rtree, node);
|
||||
return;
|
||||
@@ -283,7 +282,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
rtree_node_alloc_orig = rtree_node_alloc;
|
||||
rtree_node_alloc = rtree_node_alloc_intercept;
|
||||
rtree_node_dalloc_orig = rtree_node_dalloc;
|
||||
|
@@ -178,7 +178,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_size_classes,
|
||||
test_psize_classes,
|
||||
|
@@ -29,7 +29,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_arena_slab_regind));
|
||||
}
|
||||
|
@@ -98,7 +98,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_smoothstep_integral,
|
||||
test_smoothstep_monotonic,
|
||||
|
@@ -120,7 +120,6 @@ TEST_END
|
||||
void *
|
||||
thd_start(void *arg)
|
||||
{
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -350,7 +349,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_stats_summary,
|
||||
test_stats_large,
|
||||
|
@@ -68,7 +68,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_ticker_tick,
|
||||
test_ticker_ticks,
|
||||
|
@@ -78,7 +78,6 @@ thd_start(void *arg)
|
||||
|
||||
TEST_BEGIN(test_tsd_main_thread)
|
||||
{
|
||||
|
||||
thd_start((void *)(uintptr_t)0xa5f3e329);
|
||||
}
|
||||
TEST_END
|
||||
@@ -98,7 +97,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
/* Core tsd bootstrapping must happen prior to data_tsd_boot(). */
|
||||
if (nallocx(1, 0) == 0) {
|
||||
malloc_printf("Initialization error");
|
||||
|
@@ -33,21 +33,18 @@
|
||||
|
||||
TEST_BEGIN(test_pow2_ceil_u64)
|
||||
{
|
||||
|
||||
TEST_POW2_CEIL(uint64_t, u64, FMTu64);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_pow2_ceil_u32)
|
||||
{
|
||||
|
||||
TEST_POW2_CEIL(uint32_t, u32, FMTu32);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
TEST_BEGIN(test_pow2_ceil_zu)
|
||||
{
|
||||
|
||||
TEST_POW2_CEIL(size_t, zu, "zu");
|
||||
}
|
||||
TEST_END
|
||||
@@ -307,7 +304,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_pow2_ceil_u64,
|
||||
test_pow2_ceil_u32,
|
||||
|
@@ -14,35 +14,30 @@ static void
|
||||
witness_lock_error_intercept(const witness_list_t *witnesses,
|
||||
const witness_t *witness)
|
||||
{
|
||||
|
||||
saw_lock_error = true;
|
||||
}
|
||||
|
||||
static void
|
||||
witness_owner_error_intercept(const witness_t *witness)
|
||||
{
|
||||
|
||||
saw_owner_error = true;
|
||||
}
|
||||
|
||||
static void
|
||||
witness_not_owner_error_intercept(const witness_t *witness)
|
||||
{
|
||||
|
||||
saw_not_owner_error = true;
|
||||
}
|
||||
|
||||
static void
|
||||
witness_lockless_error_intercept(const witness_list_t *witnesses)
|
||||
{
|
||||
|
||||
saw_lockless_error = true;
|
||||
}
|
||||
|
||||
static int
|
||||
witness_comp(const witness_t *a, void *oa, const witness_t *b, void *ob)
|
||||
{
|
||||
|
||||
assert_u_eq(a->rank, b->rank, "Witnesses should have equal rank");
|
||||
|
||||
assert(oa == (void *)a);
|
||||
@@ -54,7 +49,6 @@ witness_comp(const witness_t *a, void *oa, const witness_t *b, void *ob)
|
||||
static int
|
||||
witness_comp_reverse(const witness_t *a, void *oa, const witness_t *b, void *ob)
|
||||
{
|
||||
|
||||
assert_u_eq(a->rank, b->rank, "Witnesses should have equal rank");
|
||||
|
||||
assert(oa == (void *)a);
|
||||
@@ -273,7 +267,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_witness,
|
||||
test_witness_comp,
|
||||
|
@@ -47,7 +47,6 @@ test_zero(size_t sz_min, size_t sz_max)
|
||||
|
||||
TEST_BEGIN(test_zero_small)
|
||||
{
|
||||
|
||||
test_skip_if(!config_fill);
|
||||
test_zero(1, SMALL_MAXCLASS-1);
|
||||
}
|
||||
@@ -55,7 +54,6 @@ TEST_END
|
||||
|
||||
TEST_BEGIN(test_zero_large)
|
||||
{
|
||||
|
||||
test_skip_if(!config_fill);
|
||||
test_zero(SMALL_MAXCLASS+1, (1U << (LG_LARGE_MINCLASS+1)));
|
||||
}
|
||||
@@ -64,7 +62,6 @@ TEST_END
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
|
||||
return (test(
|
||||
test_zero_small,
|
||||
test_zero_large));
|
||||
|
Reference in New Issue
Block a user