From f88f9f2ea98868c9922aa67323e6de8923e7456a Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 15 Jul 2017 22:24:16 +0200 Subject: [PATCH] In case of memory error, give a little bit more information. --- m-core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m-core.h b/m-core.h index e6fae4d4..1d71b4b1 100644 --- a/m-core.h +++ b/m-core.h @@ -1063,8 +1063,8 @@ m_core_hash (const void *str, size_t length) #include #include #define M_MEMORY_FULL(size) do { \ - fprintf(stderr, "ERROR: Can not allocate memory (%lu bytes).\n", \ - (unsigned long) size); \ + fprintf(stderr, "ERROR(M*LIB): Can not allocate memory in function %s of file %s:%d (%lu bytes).\n", \ + __func__, __FILE__, __LINE__, (unsigned long) size); \ abort(); \ } while (0) #endif