Module: kamailio
Branch: master
Commit: 753bc81c80e9d523e7032a318c95d4168e8834e4
URL:
https://github.com/kamailio/kamailio/commit/753bc81c80e9d523e7032a318c95d41…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-12-23T22:37:22+01:00
core: add some more memory logging helper defines to mem.h
- add some more memory logging helper defines to mem.h
- PKG_MEM_CRITICAL: output a generic pkg error message with log level critical
- SHM_MEM_CRITICAL: output a generic shm error message with log level critical
- SYS_MEM_ERROR/SYS_MEM_CRITICAL: generic error message for system allocation
---
Modified: src/core/mem/mem.h
---
Diff:
https://github.com/kamailio/kamailio/commit/753bc81c80e9d523e7032a318c95d41…
Patch:
https://github.com/kamailio/kamailio/commit/753bc81c80e9d523e7032a318c95d41…
---
diff --git a/src/core/mem/mem.h b/src/core/mem/mem.h
index 2a06020f82..83c03b8d98 100644
--- a/src/core/mem/mem.h
+++ b/src/core/mem/mem.h
@@ -195,10 +195,18 @@ int init_shm_mallocs(int force_alloc);
/** generic logging helper for allocation errors in private memory pool/ system */
#ifdef SYS_MALLOC
#define PKG_MEM_ERROR LM_ERR("could not allocate private memory from sys
pool\n")
+#define PKG_MEM_CRITICAL LM_CRIT("could not allocate private memory from sys
pool\n")
#else
#define PKG_MEM_ERROR LM_ERR("could not allocate private memory from pkg
pool\n")
+#define PKG_MEM_CRITICAL LM_CRIT("could not allocate private memory from pkg
pool\n")
#endif
+
+/** generic logging helper for allocation errors in system memory */
+#define SYS_MEM_ERROR LM_ERR("could not allocate memory from system\n")
+#define SYS_MEM_CRITICAL LM_CRIT("could not allocate memory from system\n")
+
/** generic logging helper for allocation errors in shared memory pool */
#define SHM_MEM_ERROR LM_ERR("could not allocate shared memory from shm
pool\n")
+#define SHM_MEM_CRITICAL LM_CRIT("could not allocate shared memory from shm
pool\n")
#endif