Skip to content

Boot OOM

include/mem/nofail.h View source View on GitHub
#define nofail(expr)
source
Expansion
#define nofail(expr) \
    ({ \
        if (global.current_bootstage >= BOOTSTAGE_COMPLETE) \
            log_msg_once(LOG_WARN, "nofail() invoked after boot"); \
        typeof(expr) _p_ = (expr); \
        if (cc_unlikely(!_p_)) \
            panic(OUT_OF_MEMORY, "%s == NULL, bootstage: %s", #expr, \
                  bootstage_str[global.current_bootstage]); \
        _p_; \
    })
#define nofail_valloc(...)
source
Expansion
#define nofail_valloc(...) nofail(valloc(__VA_ARGS__))
#define nofail_vnew(...)
source
Expansion
#define nofail_vnew(...) nofail(vnew(__VA_ARGS__))
#define nofail_vnews(...)
source
Expansion
#define nofail_vnews(...) nofail(vnews(__VA_ARGS__))
#define nofail_vnew_flex(...)
source
Expansion
#define nofail_vnew_flex(...) nofail(vnew_flex(__VA_ARGS__))
#define nofail_vrealloc(...)
source
Expansion
#define nofail_vrealloc(...) nofail(vrealloc(__VA_ARGS__))
#define nofail_vrenews(...)
source
Expansion
#define nofail_vrenews(...) nofail(vrenews(__VA_ARGS__))