mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-26 09:03:33 +03:00
Safety checks: Indirect through a function.
This will let us share code on failure pathways.pathways
This commit is contained in:
parent
f95a88fcd9
commit
b92c9a1a81
4 changed files with 20 additions and 1 deletions
11
src/safety_check.c
Normal file
11
src/safety_check.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include "jemalloc/internal/jemalloc_preamble.h"
|
||||
#include "jemalloc/internal/jemalloc_internal_includes.h"
|
||||
|
||||
void safety_check_fail(const char *format, ...) {
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
malloc_vcprintf(NULL, NULL, format, ap);
|
||||
va_end(ap);
|
||||
abort();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue