TuyaOS
tal_memory.h
浏览该文件的文档.
1
11#ifndef __TAL_MEMORY_H__
12#define __TAL_MEMORY_H__
13
14#include "tuya_cloud_types.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/***********************************************************************
21 ********************* constant ( macro and enum ) *********************
22 **********************************************************************/
23#define Malloc(req_size) tal_malloc(req_size)
24
25#define Calloc(req_count, req_size) tal_calloc(req_count, req_size)
26
27#define Free(ptr) tal_free(ptr)
28
29/***********************************************************************
30 ********************* struct ******************************************
31 **********************************************************************/
32
33
34/***********************************************************************
35 ********************* variable ****************************************
36 **********************************************************************/
37
38
39/***********************************************************************
40 ********************* function ****************************************
41 **********************************************************************/
42
50VOID_T *tal_malloc(SIZE_T size);
51
59VOID_T tal_free(VOID_T* ptr);
60
69VOID_T *tal_calloc(SIZE_T nitems, SIZE_T size);
70
79VOID_T *tal_realloc(VOID_T* ptr, SIZE_T size);
80
89
90
91#ifdef __cplusplus
92}
93#endif
94
95#endif /* __TAL_MEMORY_H__ */
96
INT32_T tal_system_get_free_heap_size(VOID_T)
Get system free heap size
VOID_T * tal_realloc(VOID_T *ptr, SIZE_T size)
Re-allocate the memory
VOID_T * tal_malloc(SIZE_T size)
This API is used to alloc memory of system.
VOID_T tal_free(VOID_T *ptr)
This API is used to free memory of system.
VOID_T * tal_calloc(SIZE_T nitems, SIZE_T size)
Allocate and clear the memory