TuyaOS
tal_memory.h
浏览该文件的文档.
1
10#ifndef __TAL_MEMORY_H__
11#define __TAL_MEMORY_H__
12
13#include "tuya_cloud_types.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
25#define Malloc(req_size) tal_malloc(req_size)
26
34#define Calloc(req_count, req_size) tal_calloc(req_count, req_size)
35
42#define Free(ptr) tal_free(ptr)
43
53VOID_T *tal_malloc(SIZE_T size);
54
64VOID_T tal_free(VOID_T* ptr);
65
74VOID_T *tal_calloc(SIZE_T nitems, SIZE_T size);
75
84VOID_T *tal_realloc(VOID_T* ptr, SIZE_T size);
85
86
87#ifdef __cplusplus
88} // extern "C"
89#endif
90
91#endif // __COMPONENT_HELLO_H__
92
VOID_T * tal_realloc(VOID_T *ptr, SIZE_T size)
Re-allocate the memory
VOID_T * tal_malloc(SIZE_T size)
Alloc memory of system
VOID_T tal_free(VOID_T *ptr)
Free memory of system
VOID_T * tal_calloc(SIZE_T nitems, SIZE_T size)
Allocate and clear the memory