|
xt-sdk 文档 v1.0.3
xt-sdk 嵌入式 SDK API 参考
|
xt 内存抽象层头文件 更多...
函数 | |
| void * | xt_mem_malloc (size_t size) |
| 分配内存 | |
| void * | xt_mem_calloc (size_t count, size_t size) |
| 分配并清空内存 | |
| void * | xt_mem_realloc (void *ptr, size_t size) |
| 重新分配内存大小 | |
| xt_err_t | xt_mem_free (void *ptr) |
| 释放内存 | |
| void * | xt_mem_caps_malloc (size_t size, uint32_t caps) |
| 分配特定的内存 | |
| void * | xt_mem_caps_realloc (void *ptr, size_t size, uint32_t caps) |
| 重新分配特定的内存 | |
| xt_err_t | xt_mem_caps_free (void *ptr) |
| 释放内存 | |
xt 内存抽象层头文件
| #define xt_calloc | ( | count, | |
| size ) |
| #define xt_caps_free | ( | ptr | ) |
| #define xt_caps_malloc | ( | size, | |
| caps ) |
| #define xt_caps_realloc | ( | ptr, | |
| size, | |||
| caps ) |
| #define xt_free | ( | ptr | ) |
| #define xt_malloc | ( | size | ) |
| #define XT_MEM_CAP_ALIGN_16 (1 << XT_MEM_CAP_ALIGN_S) |
| #define XT_MEM_CAP_ALIGN_32 (2 << XT_MEM_CAP_ALIGN_S) |
| #define XT_MEM_CAP_ALIGN_64 (3 << XT_MEM_CAP_ALIGN_S) |
| #define XT_MEM_CAP_ALIGN_8 (0 << XT_MEM_CAP_ALIGN_S) |
| #define XT_MEM_CAP_DEFAULT (0 << XT_MEM_CAP_REGION_S) |
| #define XT_MEM_CAP_EXTERNAL (1 << XT_MEM_CAP_REGION_S) |
| #define XT_MEM_CAP_REGION_0 (2 << XT_MEM_CAP_REGION_S) |
| #define XT_MEM_CAP_REGION_1 (3 << XT_MEM_CAP_REGION_S) |
| #define XT_MEM_CAP_REGION_2 (4 << XT_MEM_CAP_REGION_S) |
| #define XT_MEM_CAP_REGION_3 (5 << XT_MEM_CAP_REGION_S) |
| #define XT_MEM_CAP_REGION_4 (6 << XT_MEM_CAP_REGION_S) |
| #define XT_MEM_CAP_REGION_5 (7 << XT_MEM_CAP_REGION_S) |
| #define xt_realloc | ( | ptr, | |
| size ) |
| void * xt_mem_calloc | ( | size_t | count, |
| size_t | size ) |
分配并清空内存
| count | 要分配的内存块数量 |
| size | 要分配的内存大小(字节) |
| void * xt_mem_caps_malloc | ( | size_t | size, |
| uint32_t | caps ) |
分配特定的内存
| size | 要分配的内存大小(字节) |
| caps | 内存标志(XT_MEM_CAP_* 的组合) |
| void * xt_mem_caps_realloc | ( | void * | ptr, |
| size_t | size, | ||
| uint32_t | caps ) |
重新分配特定的内存
| ptr | 原内存指针(可以为 NULL) |
| size | 新的内存大小(字节) |
| caps | 内存标志(XT_MEM_CAP_* 的组合) |
| void * xt_mem_malloc | ( | size_t | size | ) |
分配内存
| size | 要分配的内存大小(字节) |
| void * xt_mem_realloc | ( | void * | ptr, |
| size_t | size ) |
重新分配内存大小
| ptr | 原内存指针(可以为 NULL) |
| size | 新的内存大小(字节) |