Class QuickPool¶
Defined in File QuickPool.hpp
Nested Relationships¶
Inheritance Relationships¶
Base Type¶
public umpire::strategy::AllocationStrategy
(Class AllocationStrategy)
Class Documentation¶
-
class
umpire::strategy
::
QuickPool
: public umpire::strategy::AllocationStrategy¶ Public Types
-
using
Pointer
= void*¶
Public Functions
-
QuickPool
(const std::string &name, int id, Allocator allocator, const std::size_t initial_alloc_size = (512 * 1024 * 1024), const std::size_t min_alloc_size = (1 * 1024 * 1024), CoalesceHeuristic coalesce_heuristic = percent_releasable(100)) noexcept¶
-
~QuickPool
()¶
-
void *
allocate
(std::size_t bytes) override¶ Allocate bytes of memory.
- Return
Pointer to start of allocated bytes.
- Parameters
bytes
: Number of bytes to allocate.
-
void
deallocate
(void *ptr) override¶ Free the memory at ptr.
- Parameters
ptr
: Pointer to free.
-
void
release
() override¶ Release any and all unused memory held by this AllocationStrategy.
-
std::size_t
getCurrentSize
() const noexcept override¶ Get current (total) size of the allocated memory.
This is the total size of all allocation currently ‘live’ that have been made by this AllocationStrategy object.
- Return
Current total size of allocations.
-
std::size_t
getActualSize
() const noexcept override¶ Get the current amount of memory allocated by this allocator.
Note that this can be larger than getCurrentSize(), particularly if the AllocationStrategy implements some kind of pooling.
- Return
The total size of all the memory this object has allocated.
-
std::size_t
getHighWatermark
() const noexcept override¶ Get the high watermark of the total allocated size.
This is equivalent to the highest observed value of getCurrentSize.
- Return
High watermark allocation size.
-
std::size_t
getReleasableSize
() const noexcept¶
-
Platform
getPlatform
() noexcept override¶ Get the platform associated with this AllocationStrategy.
The Platform distinguishes the appropriate place to execute operations on memory allocated by this AllocationStrategy.
- Return
The platform associated with this AllocationStrategy.
-
void
coalesce
() noexcept¶
-
std::size_t
getAllocationCount
() const noexcept¶ Get the total number of active allocations by this allocator.
- Return
The total number of active allocations this object has allocated.
-
const std::string &
getName
() noexcept¶ Get the name of this AllocationStrategy.
- Return
The name of this AllocationStrategy.
-
int
getId
() noexcept¶ Get the id of this AllocationStrategy.
- Return
The id of this AllocationStrategy.
-
MemoryResourceTraits
getTraits
() const noexcept¶
Public Static Functions
-
CoalesceHeuristic
percent_releasable
(int percentage)¶
-
using