In case of memory error, give a little bit more information.
This commit is contained in:
1 parent
d5050afd29
commit
f88f9f2ea9
1 file changed
+2
-2
@@ -1063,8 +1063,8 @@ m_core_hash (const void *str, size_t length)
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#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
|
||||
|
||||
Reference in new issue
Block a user