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 @@
# ProxyAllocator::GetPeakAllocated
```cpp
size_t GetPeakAllocated() const override;
```
获取峰值分配的字节数。
**参数:**
**返回:** 峰值分配的字节数
**线程安全:**
**复杂度:** O(1)
**示例:**
```cpp
#include <XCEngine/Memory/MemoryManager.h>
#include <XCEngine/Memory/ProxyAllocator.h>
IAllocator* sysAlloc = MemoryManager::Get().GetSystemAllocator();
ProxyAllocator proxy(sysAlloc, "TrackedAlloc");
proxy.Allocate(100);
proxy.Allocate(200);
proxy.Free(proxy.Allocate(50));
proxy.Free(proxy.Allocate(100));
size_t peakAllocated = proxy.GetPeakAllocated();
printf("Peak allocated: %zu bytes\n", peakAllocated);
```
## 相关文档
- [ProxyAllocator 总览](proxy-allocator.md) - 返回类总览