Commit graph

6 commits

Author SHA1 Message Date
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