m2mb API docs  25.30.004.0
m2mb API sets documentation
m2mb_os_debug.h
Go to the documentation of this file.
1 /* $version: 252203 */
2 /*===============================================================================================*/
3 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
36 #ifndef M2MB_OS_DEBUG_H
37 #define M2MB_OS_DEBUG_H
38 
39 /* Include ======================================================================================*/
40 #include "m2mb_types.h"
41 #include "m2mb_os_types.h"
42 #include "m2mb_os.h"
43 
44 /* Global declarations ==========================================================================*/
45 
46 
47 /* Global typedefs ==============================================================================*/
48 
49 
50 /* Global functions =============================================================================*/
51 
52 /*-----------------------------------------------------------------------------------------------*/
95 /*-----------------------------------------------------------------------------------------------*/
96 void *m2mb_os_malloc_debug( UINT32 size, const CHAR *place, INT32 line );
97 
98 
99 /*-----------------------------------------------------------------------------------------------*/
149 /*-----------------------------------------------------------------------------------------------*/
150 void *m2mb_os_calloc_debug( UINT32 size, const CHAR *place, INT32 line );
151 
152 
153 /*-----------------------------------------------------------------------------------------------*/
196 /*-----------------------------------------------------------------------------------------------*/
197 M2MB_OS_RESULT_E m2mb_os_free_debug( void *pMem, const CHAR *place, INT32 line );
198 
199 
200 /*-----------------------------------------------------------------------------------------------*/
257 /*-----------------------------------------------------------------------------------------------*/
258 void *m2mb_os_realloc_debug( void *ptr, UINT32 size, const CHAR *place, INT32 line );
259 
260 /* #define M2MB_MEM_DBG */ /* enable here the debug define (only for Telit internal debug) */
261 #ifdef M2MB_MEM_DBG
262 #define m2mb_os_malloc(size) m2mb_os_malloc_debug(size,__FUNCTION__,__LINE__)
263 #define m2mb_os_calloc(size) m2mb_os_calloc_debug(size,__FUNCTION__,__LINE__)
264 #define m2mb_os_realloc(ptr,size) m2mb_os_realloc_debug(ptr,size,__FUNCTION__,__LINE__)
265 #define m2mb_os_free(pMem) m2mb_os_free_debug(pMem,__FUNCTION__,__LINE__)
266 #endif
267 
268 #endif /* M2MB_OS_DEBUG_H */
m2mb_os.h
Basic functionality of Operating systems.
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_types.h
types used across OS (semaphore, mutex...)
m2mb_types.h
M2MB base types (ver. 121626N)
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)