Files
XCEngine/docs/api/XCEngine/Memory/Allocator/GetAllocationCount.md

477 B

IAllocator::GetAllocationCount

查询分配计数。

virtual size_t GetAllocationCount() const = 0;

行为说明

这是纯虚统计接口,但不同实现的口径不同:

  • PoolAllocator 当前返回已分配 block 数。
  • ProxyAllocator 当前返回内部统计中的 allocationCount。
  • LinearAllocator 当前始终返回 0

返回值

  • size_t - 实现定义的分配计数。

相关文档