mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-22 00:27:33 +03:00
Tweak code to allow compilation of concatenated src/*.c sources.
This resolves #294.
This commit is contained in:
parent
a6ec1c869e
commit
f9e3459f75
4 changed files with 62 additions and 46 deletions
13
src/util.c
13
src/util.c
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
* Define simple versions of assertion macros that won't recurse in case
|
||||
* of assertion failures in malloc_*printf().
|
||||
*/
|
||||
#define assert(e) do { \
|
||||
if (config_debug && !(e)) { \
|
||||
malloc_write("<jemalloc>: Failed assertion\n"); \
|
||||
|
|
@ -648,3 +652,12 @@ malloc_printf(const char *format, ...)
|
|||
malloc_vcprintf(NULL, NULL, format, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore normal assertion macros, in order to make it possible to compile all
|
||||
* C files as a single concatenation.
|
||||
*/
|
||||
#undef assert
|
||||
#undef not_reached
|
||||
#undef not_implemented
|
||||
#include "jemalloc/internal/assert.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue