Only enforce allocator initialization if the option is set

This commit is contained in:
cyanlemons 2020-10-03 17:22:42 +00:00 committed by GitHub
parent d79cf9ae5a
commit bd29c77d32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {