Project

General

Profile

Feature #2336 ยป 0082-Make-handle_alloc_failure-fc__noreturn.patch

Marko Lindqvist, 10/17/2026 12:07 PM

View differences:

utility/mem.c
Do whatever we should do when fc_malloc() fails.
At the moment this just prints a log message and calls exit(EXIT_FAILURE)
**********************************************************************/
static void handle_alloc_failure(size_t size, const char *called_as,
int line, const char *file)
static void fc__noreturn handle_alloc_failure(size_t size, const char *called_as,
int line, const char *file)
{
log_fatal("Out of memory trying to %s " SIZE_T_PRINTF " bytes at line %d of %s.",
called_as, size, line, file);
    (1-1/1)