Browse code

made DBG_QM work again

Jiri Kuthan authored on 25/06/2002 17:33:39
Showing 1 changed files
... ...
@@ -127,17 +127,20 @@ again:
127 127
 	MY_MALLOC(shm_block, (_size), __FILE__, __FUNCTION__, __LINE__ )
128 128
 
129 129
 
130
-
131
-inline static void* shm_malloc(unsigned int size)
130
+inline static void* _shm_malloc(unsigned int size, 
131
+	char *file, char *function, int line )
132 132
 {
133 133
 	void *p;
134 134
 	
135 135
 	shm_lock();\
136
-	p=shm_malloc_unsafe(size);
136
+	p=MY_MALLOC(shm_block, size, file, function, line );
137 137
 	shm_unlock();
138 138
 	return p; 
139 139
 }
140 140
 
141
+#define shm_malloc( _size ) _shm_malloc((_size), \
142
+	__FILE__, __FUNCTION__, __LINE__ )
143
+
141 144
 
142 145
 
143 146
 #define shm_free_unsafe( _p  ) \
... ...
@@ -150,6 +153,7 @@ do { \
150 150
 		shm_unlock(); \
151 151
 }while(0)
152 152
 
153
+void* _shm_resize( void*, unsigned int, char*, char*, unsigned int);
153 154
 #define shm_resize(_p, _s ) \
154 155
 	_shm_resize( (_p), (_s),   __FILE__, __FUNCTION__, __LINE__)
155 156
 
... ...
@@ -171,12 +175,7 @@ inline static void* shm_malloc(unsigned int size)
171 171
 }
172 172
 
173 173
 
174
-#ifdef DBG_QM_MALLOC
175
-void* _shm_resize( void*, unsigned int, char*, char*, unsigned int);
176
-#else
177 174
 void* _shm_resize( void*, unsigned int);
178
-#endif
179
-
180 175
 
181 176
 #define shm_free_unsafe( _p ) MY_FREE(shm_block, (_p))
182 177