Returns the allocated size of the buffer at 'ptr' if known, otherwise returns 0. This method can be called when TracksAllocationSizes() is false, but can be extremely slow. REQUIRES: 'ptr!=nullptr' and points to a buffer previously allocated by this allocator.
| 208 | // REQUIRES: 'ptr!=nullptr' and points to a buffer previously |
| 209 | // allocated by this allocator. |
| 210 | virtual size_t AllocatedSizeSlow(const void* ptr) const { |
| 211 | if (TracksAllocationSizes()) { |
| 212 | return AllocatedSize(ptr); |
| 213 | } |
| 214 | return 0; |
| 215 | } |
| 216 | |
| 217 | // Fills in 'stats' with statistics collected by this allocator. |
| 218 | virtual absl::optional<AllocatorStats> GetStats() { return absl::nullopt; } |
no outgoing calls
no test coverage detected