docs: rebuild Memory API content

This commit is contained in:
2026-03-26 18:02:29 +08:00
parent ce2eee32e3
commit dc252502ac
66 changed files with 1182 additions and 1066 deletions

View File

@@ -1,30 +1,25 @@
# PoolAllocator::GetFreeBlockCount
获取相关状态或对象
查询当前空闲 block 数
```cpp
size_t GetFreeBlockCount() const;
```
该方法声明于 `XCEngine/Memory/PoolAllocator.h`,当前页面用于固定 `PoolAllocator` 类目录下的方法级 canonical 路径。
## 行为说明
**参数:**
当前实现直接返回 `m_freeBlocks`
**返回:** `size_t` - 返回值语义详见头文件声明。
## 返回值
**示例:**
- `size_t` - 当前空闲 block 数。
```cpp
#include <XCEngine/Memory/PoolAllocator.h>
## 注意事项
void Example() {
XCEngine::Memory::PoolAllocator object;
// 根据上下文补齐参数后调用 PoolAllocator::GetFreeBlockCount(...)。
(void)object;
}
```
- 这是一个“当前快照值”,不是历史统计。
- 如果调用方错误地传入无效指针或重复释放,`m_freeBlocks` 会被破坏,这里的结果也会随之失真。
## 相关文档
- [返回类总览](PoolAllocator.md)
- [返回模块目录](../Memory.md)
- [返回类总览](PoolAllocator.md)
- [GetAllocationCount](GetAllocationCount.md)