docs: update memory and threading API docs
This commit is contained in:
27
docs/api/memory/linear-allocator/get-name.md
Normal file
27
docs/api/memory/linear-allocator/get-name.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# LinearAllocator::GetName
|
||||
|
||||
```cpp
|
||||
const char* GetName() const override;
|
||||
```
|
||||
|
||||
返回分配器的名称字符串,用于调试和日志输出。
|
||||
|
||||
**参数:** 无
|
||||
|
||||
**返回:** 固定返回 `"LinearAllocator"`
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Memory/LinearAllocator.h>
|
||||
|
||||
LinearAllocator allocator(1024);
|
||||
|
||||
const char* name = allocator.GetName(); // "LinearAllocator"
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [LinearAllocator 总览](linear-allocator.md) - 返回类总览
|
||||
Reference in New Issue
Block a user