Use MALLOC_CONF rather than malloc_conf for tests.
malloc_conf does not reliably work with MSVC, which complains of "inconsistent dll linkage", i.e. its inability to support the application overriding malloc_conf when dynamically linking/loading. Work around this limitation by adding test harness support for per test shell script sourcing, and converting all tests to use MALLOC_CONF instead of malloc_conf.
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
#include "test/jemalloc_test.h"
|
||||
|
||||
#ifdef JEMALLOC_FILL
|
||||
const char *malloc_conf = "junk:false";
|
||||
#endif
|
||||
|
||||
#include "test/extent_hooks.h"
|
||||
|
||||
static void
|
||||
|
5
test/integration/extent.sh
Normal file
5
test/integration/extent.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "x${enable_fill}" = "x1" ] ; then
|
||||
export MALLOC_CONF="junk:false"
|
||||
fi
|
@@ -1,9 +1,5 @@
|
||||
#include "test/jemalloc_test.h"
|
||||
|
||||
#ifdef JEMALLOC_FILL
|
||||
const char *malloc_conf = "junk:false";
|
||||
#endif
|
||||
|
||||
static unsigned
|
||||
get_nsizes_impl(const char *cmd) {
|
||||
unsigned ret;
|
||||
|
5
test/integration/mallocx.sh
Normal file
5
test/integration/mallocx.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "x${enable_fill}" = "x1" ] ; then
|
||||
export MALLOC_CONF="junk:false"
|
||||
fi
|
@@ -1,9 +1,5 @@
|
||||
#include "test/jemalloc_test.h"
|
||||
|
||||
#ifdef JEMALLOC_FILL
|
||||
const char *malloc_conf = "junk:false";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Use a separate arena for xallocx() extension/contraction tests so that
|
||||
* internal allocation e.g. by heap profiling can't interpose allocations where
|
||||
|
5
test/integration/xallocx.sh
Normal file
5
test/integration/xallocx.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "x${enable_fill}" = "x1" ] ; then
|
||||
export MALLOC_CONF="junk:false"
|
||||
fi
|
Reference in New Issue
Block a user