|
UMPIRE
Umpire: resource management and provision
|
Uses malloc and free to allocate and deallocate CPU memory. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/umpire/checkouts/develop/src/umpire/alloc/MallocAllocator.hpp>
Public Member Functions | |
| void * | allocate (std::size_t bytes) |
| Allocate bytes of memory using malloc. More... | |
| void | deallocate (void *ptr) |
| Deallocate memory using free. More... | |
| bool | isHostPageable () |
| bool | isAccessible (Platform p) |
Uses malloc and free to allocate and deallocate CPU memory.
|
inline |
Allocate bytes of memory using malloc.
| bytes | Number of bytes to allocate. |
| umpire::util::runtime_error | if memory cannot be allocated. |
References umpire::util::message::Debug, umpire::malloc(), UMPIRE_ERROR, and UMPIRE_LOG.
|
inline |
Deallocate memory using free.
| ptr | Address to deallocate. |
| umpire::util::runtime_error | if memory cannot be free'd. |
References umpire::util::message::Debug, umpire::free(), and UMPIRE_LOG.
|
inline |
References UMPIRE_ERROR.
Referenced by isAccessible().
|
inline |
References isHostPageable().