Dag-Erling Smørgrav
6ed802ddf3
Consistently use #if HAVE_FOO instead of #ifdef HAVE_FOO. The reason is
...
that AC_CHECK_DECLS([foo]), unlike AC_CHECK_FUNCS([foo]), will always
define HAVE_FOO, so #ifdef HAVE_FOO will always be true even if it is 0.
This commit finally fixes the [bl]e{32,64}{enc,dec} issue on Linux.
2014-12-20 00:38:54 +00:00
Dag-Erling Smørgrav
a587a25d45
Ignore free(NULL) instead of treating it the same as free(malloc(0)).
2014-10-30 16:35:54 +00:00
Dag-Erling Smørgrav
1f0fd8d9fe
Create an additional test case which always runs after cleanup and checks
...
for memory leaks. It may be necessary to make this optional at some point,
but for now, none of our tests leak memory.
2014-10-30 16:31:03 +00:00
Dag-Erling Smørgrav
14c64ec3a5
Improved checks for <sys/ktrace.h>.
2014-10-30 13:07:16 +00:00
Dag-Erling Smørgrav
46beb1adcb
Various fixes for Linux and gcc portability.
2014-10-30 12:14:05 +00:00
Dag-Erling Smørgrav
bd69c34a11
Emit jemalloc-compatible trace events if possible.
2014-10-30 12:05:08 +00:00
Dag-Erling Smørgrav
bf087fd70e
Gather memory allocation statistics and print them at the end if verbose.
2014-10-30 11:05:01 +00:00
Dag-Erling Smørgrav
4a4726f9d6
Compare the result of mmap() to MAP_FAILED, not NULL.
2014-10-18 22:01:08 +00:00
Dag-Erling Smørgrav
64a2da2b84
Refactor the malloc() etc code to reduce code duplication.
...
Introduce a t_malloc_fatal flag that makes unintentional allocation
failures fatal. This reduces the need for error handling in tests.
Enable that flag in t_main(). Test programs that don't want it can
override it in t_prepare().
2014-08-03 00:58:13 +00:00
Dag-Erling Smørgrav
ce567a72e0
Add a simple malloc() implementation which can be configured to fail
...
when testing error handling code.
2014-08-02 23:30:07 +00:00