[sr-dev] git:master:1755c1b7: core: mem - shm common defines to pass the module name
Daniel-Constantin Mierla
miconda at gmail.com
Mon Nov 2 14:00:20 CET 2015
Module: kamailio
Branch: master
Commit: 1755c1b7d60327b43ec5fa4ee4d3d309c23dc223
URL: https://github.com/kamailio/kamailio/commit/1755c1b7d60327b43ec5fa4ee4d3d309c23dc223
Author: Stefan Mititelu <stefan.mititelu at 1and1.ro>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-11-02T13:47:26+01:00
core: mem - shm common defines to pass the module name
---
Modified: mem/shm_mem.c
Modified: mem/shm_mem.h
---
Diff: https://github.com/kamailio/kamailio/commit/1755c1b7d60327b43ec5fa4ee4d3d309c23dc223.diff
Patch: https://github.com/kamailio/kamailio/commit/1755c1b7d60327b43ec5fa4ee4d3d309c23dc223.patch
---
diff --git a/mem/shm_mem.c b/mem/shm_mem.c
index 8395cfd..f2800b0 100644
--- a/mem/shm_mem.c
+++ b/mem/shm_mem.c
@@ -94,7 +94,7 @@ inline static void* sh_realloc(void* p, unsigned int size)
#ifdef DBG_QM_MALLOC
void* _shm_resize( void* p, unsigned int s, const char* file, const char* func,
- int line)
+ int line, const char *mname)
#else
void* _shm_resize( void* p , unsigned int s)
#endif
diff --git a/mem/shm_mem.h b/mem/shm_mem.h
index 35d6503..f170bd9 100644
--- a/mem/shm_mem.h
+++ b/mem/shm_mem.h
@@ -211,41 +211,41 @@ void shm_mem_destroy(void);
#include "src_loc.h"
#define shm_malloc_unsafe(_size ) \
- MY_MALLOC(shm_block, (_size), _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_ )
+ MY_MALLOC(shm_block, (_size), _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_)
inline static void* _shm_malloc(unsigned int size,
- const char *file, const char *function, int line )
+ const char *file, const char *function, int line, const char *mname)
{
void *p;
shm_lock();
- p=MY_MALLOC(shm_block, size, file, function, line );
+ p=MY_MALLOC(shm_block, size, file, function, line, mname);
shm_unlock();
return p;
}
inline static void* _shm_realloc(void *ptr, unsigned int size,
- const char* file, const char* function, int line )
+ const char* file, const char* function, int line, const char *mname)
{
void *p;
shm_lock();
- p=MY_REALLOC(shm_block, ptr, size, file, function, line);
+ p=MY_REALLOC(shm_block, ptr, size, file, function, line, mname);
shm_unlock();
return p;
}
#define shm_malloc( _size ) _shm_malloc((_size), \
- _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_ )
+ _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_ , _SRC_MODULE_)
#define shm_realloc( _ptr, _size ) _shm_realloc( (_ptr), (_size), \
- _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_ )
+ _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_)
#define shm_free_unsafe( _p ) \
- MY_FREE( shm_block, (_p), _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_ )
+ MY_FREE( shm_block, (_p), _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_)
#define shm_free(_p) \
do { \
@@ -257,9 +257,9 @@ do { \
void* _shm_resize(void* ptr, unsigned int size, const char* f, const char* fn,
- int line);
+ int line, const char *mname);
#define shm_resize(_p, _s ) _shm_resize((_p), (_s), \
- _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_ )
+ _SRC_LOC_, _SRC_FUNCTION_, _SRC_LINE_, _SRC_MODULE_)
/*#define shm_resize(_p, _s ) shm_realloc( (_p), (_s))*/
More information about the sr-dev
mailing list