docs: update memory and threading API docs

This commit is contained in:
2026-03-20 02:35:24 +08:00
parent c5b17239ca
commit fd792b7df1
103 changed files with 2485 additions and 673 deletions

View File

@@ -0,0 +1,37 @@
# MemoryManager::GenerateMemoryReport
```cpp
void GenerateMemoryReport();
```
生成并输出当前内存使用情况的详细报告。报告内容包括各分配器的统计信息、峰值使用量、分配次数等。应在启用内存跟踪后调用。
**参数:**
**返回:**
**复杂度:** O(n)
**示例:**
```cpp
#include <XCEngine/Memory/MemoryManager.h>
MemoryManager::Get().Initialize();
auto proxy = MemoryManager::Get().CreateProxyAllocator("GameFrame");
proxy->Allocate(1024 * 1024);
proxy->Allocate(512 * 1024);
// 生成内存报告
MemoryManager::Get().GenerateMemoryReport();
proxy->Free(proxy->Allocate(256 * 1024));
MemoryManager::Get().GenerateMemoryReport();
MemoryManager::Get().Shutdown();
```
## 相关文档
- [MemoryManager 总览](memorymanager.md) - 返回类总览