Allocators are the fundamental object used to allocate and deallocate memory using Umpire.

class Allocator

Provides a unified interface to allocate and free data.

An Allocator encapsulates all the details of how and where allocations will be made, and can also be used to introspect the memory resource. Allocator objects do not return typed allocations, so the pointer returned from the allocate method must be cast to the relevant type.



template<typename T>
class TypedAllocator

Allocator for objects of type T.

This class is an adaptor that allows using an Allocator to allocate objects of type T. You can use this class as an allocator for STL containers like std::vector.