浏览代码

add SHM_MEM_ERROR and PKG_MEM_ERROR logging macros to mem.h

Henning Westerholt 17 年之前
父节点
当前提交
f34610e3ec
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      mem/mem.h

+ 9 - 0
mem/mem.h

@@ -152,4 +152,13 @@
 int init_pkg_mallocs();
 int init_shm_mallocs(int force_alloc);
 
+/*! generic logging helper for allocation errors in private memory pool/ system */
+#ifdef SYSTEM_MALLOC
+#define PKG_MEM_ERROR LM_ERR("could not allocate private memory from system")
+#else
+#define PKG_MEM_ERROR LM_ERR("could not allocate private memory from available pool")
+#endif
+/*! generic logging helper for allocation errors in shared memory pool */
+#define SHM_MEM_ERROR LM_ERR("could not allocate shared memory from available pool")
+
 #endif