The implementation is available as a public member.
If impl.alignedAllocate exists, calls it and returns the result. Otherwise, always returns null.
Forwards to impl.alignedReallocate if defined, false otherwise.
Returns impl.allocate(s).
Returns impl.allocateAll() if present, null otherwise.
If impl.deallocate is not defined, returns false. Otherwise it forwards the call.
Calls impl.deallocateAll() and returns the result if defined, otherwise returns false.
Forwards to impl.empty() if defined, otherwise returns Ternary.unknown.
Returns impl.expand(b, s) if defined, false otherwise.
Returns impl.goodAllocSize(s).
The implementation is available as a public member.
If Allocator implements owns, forwards to it. Otherwise, returns Ternary.unknown.
Returns impl.reallocate(b, s).
Returns impl.alignment.
Returns the alignment offered.
Returns the good allocation size that guarantees zero internal fragmentation.
Allocates n bytes of memory.
Allocates n bytes of memory with specified alignment a. Implementations that do not support this primitive should always return null.
Allocates and returns all memory available to this allocator. Implementations that do not support this primitive should always return null.
Expands a memory block in place and returns true if successful. Implementations that don't support this primitive should always return false.
Reallocates a memory block.
Reallocates a memory block with specified alignment.
Returns Ternary.yes if the allocator owns b, Ternary.no if the allocator doesn't own b, and Ternary.unknown if ownership cannot be determined. Implementations that don't support this primitive should always return Ternary.unknown.
Resolves an internal pointer to the full block allocated. Implementations that don't support this primitive should always return Ternary.unknown.
Deallocates a memory block. Implementations that don't support this primitive should always return false. A simple way to check that an allocator supports deallocation is to call deallocate(null).
Deallocates all memory. Implementations that don't support this primitive should always return false.
Returns Ternary.yes if no memory is currently allocated from this allocator, Ternary.no if some allocations are currently active, or Ternary.unknown if not supported.
Increases the reference count of the concrete class that implements this interface.
Decreases the reference count of the concrete class that implements this interface. When the reference count is 0, the object self-destructs.
Implementation of IAllocator using Allocator. This adapts a statically-built allocator type to IAllocator that is directly usable by non-templated code.
Usually CAllocatorImpl is used indirectly by calling theAllocator.