m2mb API docs  25.30.003
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. <<< */
35 #ifndef M2MB_OS_DEBUG_H
36 #define M2MB_OS_DEBUG_H
37 
38 /* Include ======================================================================================*/
39 #include "m2mb_types.h"
40 #include "m2mb_os_types.h"
41 #include "m2mb_os.h"
42 
43 /* Global declarations ==========================================================================*/
44 
45 
46 /* Global typedefs ==============================================================================*/
47 
48 
49 /* Global functions =============================================================================*/
50 
51 /*-----------------------------------------------------------------------------------------------*/
94 /*-----------------------------------------------------------------------------------------------*/
95 void *m2mb_os_malloc_debug( UINT32 size, const CHAR *place, INT32 line );
96 
97 
98 /*-----------------------------------------------------------------------------------------------*/
148 /*-----------------------------------------------------------------------------------------------*/
149 void *m2mb_os_calloc_debug( UINT32 size, const CHAR *place, INT32 line );
150 
151 
152 /*-----------------------------------------------------------------------------------------------*/
195 /*-----------------------------------------------------------------------------------------------*/
196 M2MB_OS_RESULT_E m2mb_os_free_debug( void *pMem, const CHAR *place, INT32 line );
197 
198 
199 /*-----------------------------------------------------------------------------------------------*/
256 /*-----------------------------------------------------------------------------------------------*/
257 void *m2mb_os_realloc_debug( void *ptr, UINT32 size, const CHAR *place, INT32 line );
258 
259 /* #define M2MB_MEM_DBG */ /* enable here the debug define (only for Telit internal debug) */
260 #ifdef M2MB_MEM_DBG
261 #define m2mb_os_malloc(size) m2mb_os_malloc_debug(size,__FUNCTION__,__LINE__)
262 #define m2mb_os_calloc(size) m2mb_os_calloc_debug(size,__FUNCTION__,__LINE__)
263 #define m2mb_os_realloc(ptr,size) m2mb_os_realloc_debug(ptr,size,__FUNCTION__,__LINE__)
264 #define m2mb_os_free(pMem) m2mb_os_free_debug(pMem,__FUNCTION__,__LINE__)
265 #endif
266 
267 #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)