summaryrefslogtreecommitdiff
path: root/lib/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/log.c')
-rw-r--r--lib/log.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/log.c b/lib/log.c
index 9821483d69..1ecc5b6df6 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -680,6 +680,14 @@ _zlog_assert_failed (const char *assertion, const char *file,
abort();
}
+void
+memory_oom (size_t size, const char *name)
+{
+ zlog_err("out of memory: failed to allocate %zu bytes for %s"
+ "object", size, name);
+ zlog_backtrace(LOG_ERR);
+ abort();
+}
/* Open log stream */
struct zlog *