CIRCT 24.0.0git
Loading...
Searching...
No Matches
esi::services::HostMemAllocator Class Referenceabstract

Interface for anything which can allocate HostMemRegions. More...

#include <Services.h>

Inheritance diagram for esi::services::HostMemAllocator:

Classes

struct  Options
 Options for allocating host memory. More...

Public Member Functions

virtual ~HostMemAllocator ()=default
virtual std::unique_ptr< HostMemRegion > allocate (std::size_t size, Options opts) const =0
 Allocate a region of host memory in accelerator accessible address space.

Detailed Description

Interface for anything which can allocate HostMemRegions.

Implemented by the HostMem service; also lets code which only needs to allocate regions (e.g. message types which keep their data in HostMem) accept other allocators, such as pools.

Definition at line 263 of file Services.h.

Constructor & Destructor Documentation

◆ ~HostMemAllocator()

virtual esi::services::HostMemAllocator::~HostMemAllocator ( )
virtualdefault

Member Function Documentation

◆ allocate()

virtual std::unique_ptr< HostMemRegion > esi::services::HostMemAllocator::allocate ( std::size_t size,
Options opts ) const
pure virtual

Allocate a region of host memory in accelerator accessible address space.

Returns nullptr if the region cannot be allocated. Implementations MUST return nullptr when size is 0.

Implemented in esi::services::HostMem.

Referenced by checkHostMemTake().


The documentation for this class was generated from the following file: