From bd29c77d32ce30ff977690451d2780bbde633e2b Mon Sep 17 00:00:00 2001 From: cyanlemons <64322512+cyanlemons@users.noreply.github.com> Date: Sat, 3 Oct 2020 17:22:42 +0000 Subject: [PATCH] Only enforce allocator initialization if the option is set --- h_malloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/h_malloc.c b/h_malloc.c index 16845f7..7bdedbc 100644 --- a/h_malloc.c +++ b/h_malloc.c @@ -1043,9 +1043,11 @@ static inline bool is_init(void) { } static inline void enforce_init(void) { +#if CONFIG_ENFORCE_INIT if (!is_init()) { fatal_error("invalid uninitialized allocator usage"); } +#endif } COLD static void init_slow_path(void) {