123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- #ifndef OSAL_MEMORY_H
- #define OSAL_MEMORY_H
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- #include "comdef.h"
-
- #if !defined ( OSALMEM_METRICS )
- #define OSALMEM_METRICS FALSE
- #endif
-
- #define osal_stack_used() OnBoard_stack_used()
-
-
- void osal_mem_init( void );
-
- void osal_mem_kick( void );
-
- #ifdef DPRINTF_OSALHEAPTRACE
- void *osal_mem_alloc_dbg( uint16 size, const char *fname, unsigned lnum );
- #define osal_mem_alloc(_size ) osal_mem_alloc_dbg(_size, __FILE__, __LINE__)
- #else
- void *osal_mem_alloc( uint16 size );
- #endif
-
- #ifdef DPRINTF_OSALHEAPTRACE
- void osal_mem_free_dbg( void *ptr, const char *fname, unsigned lnum );
- #define osal_mem_free(_ptr ) osal_mem_free_dbg(_ptr, __FILE__, __LINE__)
- #else
- void osal_mem_free( void *ptr );
- #endif
- #if ( OSALMEM_METRICS )
-
- uint16 osal_heap_block_max( void );
-
- uint16 osal_heap_block_cnt( void );
-
- uint16 osal_heap_block_free( void );
-
- uint16 osal_heap_mem_used( void );
- #endif
- #if defined (ZTOOL_P1) || defined (ZTOOL_P2)
-
- uint16 osal_heap_high_water( void );
- #endif
- #ifdef __cplusplus
- }
- #endif
- #endif
|