xf_heap 堆内存接口。
更多...
xf_heap 堆内存接口。
如 xf_malloc, xf_free 等。 通常直接使用即可,需要时可通过 xf_heap_redirect() 函数重定向内存管理实现。 xfusion 用户使用 xf_heap 时只需 #include "xf_heap.h"
即可。
◆ xf_malloc()
void * xf_malloc |
( |
unsigned int |
size | ) |
|
◆ xf_free()
void xf_free |
( |
void * |
pv | ) |
|
释放内存。
- 参数
-
- 注解
- 释放内存后记得将指针指向 NULL,以防出现访问未申请的内存。
在文件 xf_heap.c 第 117 行定义.
◆ xf_heap_get_free_size()
unsigned int xf_heap_get_free_size |
( |
void |
| ) |
|
◆ xf_heap_get_min_ever_free_size()
unsigned int xf_heap_get_min_ever_free_size |
( |
void |
| ) |
|
获取曾经最小的空闲内存块。
- 返回
- unsigned int 内存块大小。
在文件 xf_heap.c 第 133 行定义.