m2mb API docs  25.21.002
m2mb API sets documentation
m2mb_os_debug.h
Go to the documentation of this file.
1 /*===============================================================================================*/
2 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
28 #ifndef M2MB_OS_DEBUG_H
29 #define M2MB_OS_DEBUG_H
30 
31 /* Include ======================================================================================*/
32 
33 /* Global declarations ==========================================================================*/
34 
35 
36 /* Global typedefs ==============================================================================*/
37 
38 
39 /* Global functions =============================================================================*/
40 
41 /*-----------------------------------------------------------------------------------------------*/
84 /*-----------------------------------------------------------------------------------------------*/
85 void *m2mb_os_malloc_debug( UINT32 size, const CHAR *place, INT32 line );
86 
87 
88 /*-----------------------------------------------------------------------------------------------*/
138 /*-----------------------------------------------------------------------------------------------*/
139 void *m2mb_os_calloc_debug( UINT32 size, const CHAR *place, INT32 line );
140 
141 
142 /*-----------------------------------------------------------------------------------------------*/
185 /*-----------------------------------------------------------------------------------------------*/
186 M2MB_OS_RESULT_E m2mb_os_free_debug( void *pMem, const CHAR *place, INT32 line );
187 
188 
189 /*-----------------------------------------------------------------------------------------------*/
246 /*-----------------------------------------------------------------------------------------------*/
247 void *m2mb_os_realloc_debug( void *ptr, UINT32 size, const CHAR *place, INT32 line );
248 
249 /* #define M2MB_MEM_DBG */ /* enable here the debug define */
250 #ifdef M2MB_MEM_DBG
251 #define m2mb_os_malloc(size) m2mb_os_malloc_debug(size,__FUNCTION__,__LINE__)
252 #define m2mb_os_calloc(size) m2mb_os_calloc_debug(size,__FUNCTION__,__LINE__)
253 #define m2mb_os_realloc(ptr,size) m2mb_os_realloc_debug(ptr,size,__FUNCTION__,__LINE__)
254 #define m2mb_os_free(pMem) m2mb_os_free_debug(pMem,__FUNCTION__,__LINE__)
255 #endif
256 
257 #endif /* M2MB_OS_DEBUG_H */
m2mb_os_malloc_debug
void * m2mb_os_malloc_debug(UINT32 size, const CHAR *place, INT32 line)
Allocates bytes of memory (to be used for debug purposes)
m2mb_os_calloc_debug
void * m2mb_os_calloc_debug(UINT32 size, const CHAR *place, INT32 line)
Allocates bytes of memory and init space with 0 (to be used for debug purposes)
m2mb_os_realloc_debug
void * m2mb_os_realloc_debug(void *ptr, UINT32 size, const CHAR *place, INT32 line)
Dynamic memory reallocation (to be used for debug purposes)
m2mb_os_free_debug
M2MB_OS_RESULT_E m2mb_os_free_debug(void *pMem, const CHAR *place, INT32 line)
Free allocated memory (to be used for debug purposes)