Struct PosixMemalignAllocator¶
Defined in File PosixMemalignAllocator.hpp
Struct Documentation¶
-
struct
PosixMemalignAllocator
¶ Uses posix_memalign() and free() to allocate page-aligned memory.
Public Functions
-
void *
allocate
(std::size_t bytes)¶ Allocate bytes of memory using posix_memalign.
- Return
Pointer to start of the allocation.
- Parameters
bytes
: Number of bytes to allocate. Does not have to be a multiple of the system page size.
- Exceptions
umpire::util::Exception
: if memory cannot be allocated.
-
void
deallocate
(void *ptr)¶ Deallocate memory using free.
- Parameters
ptr
: Address to deallocate.
- Exceptions
umpire::util::Exception
: if memory cannot be free’d.
-
void *