fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
This commit is contained in:
37
docs/api/memory/manager/generate-memory-report.md
Normal file
37
docs/api/memory/manager/generate-memory-report.md
Normal 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 总览](manager.md) - 返回类总览
|
||||
Reference in New Issue
Block a user