|
@@ -49,17 +49,17 @@ extern sr_shm_api_t _shm_root;
|
|
#ifdef DBG_SR_MEMORY
|
|
#ifdef DBG_SR_MEMORY
|
|
|
|
|
|
# define shm_malloc(s) _shm_root.xmalloc(_shm_root.mem_block, (s), _SRC_LOC_, \
|
|
# define shm_malloc(s) _shm_root.xmalloc(_shm_root.mem_block, (s), _SRC_LOC_, \
|
|
- _SRC_FUNCTION_, _SRC_LINE_)
|
|
|
|
|
|
+ _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_)
|
|
# define shm_malloc_unsafe(s) _shm_root.xmalloc_unsafe(_shm_root.mem_block, (s), _SRC_LOC_, \
|
|
# define shm_malloc_unsafe(s) _shm_root.xmalloc_unsafe(_shm_root.mem_block, (s), _SRC_LOC_, \
|
|
- _SRC_FUNCTION_, _SRC_LINE_)
|
|
|
|
|
|
+ _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_)
|
|
# define shm_realloc(p, s) _shm_root.xrealloc(_shm_root.mem_block, (p), (s), \
|
|
# define shm_realloc(p, s) _shm_root.xrealloc(_shm_root.mem_block, (p), (s), \
|
|
- _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_)
|
|
|
|
|
|
+ _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_)
|
|
# define shm_resize(p, s) _shm_root.xresize(_shm_root.mem_block, (p), (s), \
|
|
# define shm_resize(p, s) _shm_root.xresize(_shm_root.mem_block, (p), (s), \
|
|
- _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_)
|
|
|
|
|
|
+ _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_)
|
|
# define shm_free(p) _shm_root.xfree(_shm_root.mem_block, (p), _SRC_LOC_, \
|
|
# define shm_free(p) _shm_root.xfree(_shm_root.mem_block, (p), _SRC_LOC_, \
|
|
- _SRC_FUNCTION_, _SRC_LINE_)
|
|
|
|
|
|
+ _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_)
|
|
# define shm_free_unsafe(p) _shm_root.xfree_unsafe(_shm_root.mem_block, (p), _SRC_LOC_, \
|
|
# define shm_free_unsafe(p) _shm_root.xfree_unsafe(_shm_root.mem_block, (p), _SRC_LOC_, \
|
|
- _SRC_FUNCTION_, _SRC_LINE_)
|
|
|
|
|
|
+ _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_)
|
|
#else
|
|
#else
|
|
# define shm_malloc(s) _shm_root.xmalloc(_shm_root.mem_block, (s))
|
|
# define shm_malloc(s) _shm_root.xmalloc(_shm_root.mem_block, (s))
|
|
# define shm_malloc_unsafe(s) _shm_root.xmalloc_unsafe(_shm_root.mem_block, (s))
|
|
# define shm_malloc_unsafe(s) _shm_root.xmalloc_unsafe(_shm_root.mem_block, (s))
|
|
@@ -73,6 +73,9 @@ extern sr_shm_api_t _shm_root;
|
|
# define shm_info(mi) _shm_root.xinfo(_shm_root.mem_block, mi)
|
|
# define shm_info(mi) _shm_root.xinfo(_shm_root.mem_block, mi)
|
|
# define shm_available() _shm_root.xavailable(_shm_root.mem_block)
|
|
# define shm_available() _shm_root.xavailable(_shm_root.mem_block)
|
|
# define shm_sums() _shm_root.xsums(_shm_root.mem_block)
|
|
# define shm_sums() _shm_root.xsums(_shm_root.mem_block)
|
|
|
|
+# define shm_mod_get_stats(x) _shm_root.xstats(_shm_root.mem_block, x)
|
|
|
|
+# define shm_mod_free_stats(x) _shm_root.xfstats(x)
|
|
|
|
+
|
|
|
|
|
|
void* shm_core_get_pool(void);
|
|
void* shm_core_get_pool(void);
|
|
int shm_init_api(sr_shm_api_t *ap);
|
|
int shm_init_api(sr_shm_api_t *ap);
|