|
@@ -211,41 +211,41 @@ void shm_mem_destroy(void);
|
|
#include "src_loc.h"
|
|
#include "src_loc.h"
|
|
|
|
|
|
#define shm_malloc_unsafe(_size ) \
|
|
#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,
|
|
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;
|
|
void *p;
|
|
|
|
|
|
shm_lock();
|
|
shm_lock();
|
|
- p=MY_MALLOC(shm_block, size, file, function, line );
|
|
|
|
|
|
+ p=MY_MALLOC(shm_block, size, file, function, line, mname);
|
|
shm_unlock();
|
|
shm_unlock();
|
|
return p;
|
|
return p;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
inline static void* _shm_realloc(void *ptr, unsigned int size,
|
|
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;
|
|
void *p;
|
|
shm_lock();
|
|
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();
|
|
shm_unlock();
|
|
return p;
|
|
return p;
|
|
}
|
|
}
|
|
|
|
|
|
#define shm_malloc( _size ) _shm_malloc((_size), \
|
|
#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), \
|
|
#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 ) \
|
|
#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) \
|
|
#define shm_free(_p) \
|
|
do { \
|
|
do { \
|
|
@@ -257,9 +257,9 @@ do { \
|
|
|
|
|
|
|
|
|
|
void* _shm_resize(void* ptr, unsigned int size, const char* f, const char* fn,
|
|
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), \
|
|
#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))*/
|
|
/*#define shm_resize(_p, _s ) shm_realloc( (_p), (_s))*/
|
|
|
|
|
|
|
|
|