|
Mantid
|
Mock the availMem function with RAII. More...
#include <MockMemory.h>
Public Member Functions | |
| MockMemory (MockMemory &&)=delete | |
| MockMemory (MockMemory const &)=delete | |
| MockMemory (std::size_t value=g_default_value) | |
| Patch the available memory while in scope. | |
| std::size_t | numberOfFloats () const |
| MockMemory & | operator= (MockMemory &&)=delete |
| MockMemory & | operator= (MockMemory const &)=delete |
| ~MockMemory () | |
Private Attributes | |
| std::size_t | m_value {g_default_value} |
Mock the availMem function with RAII.
Construct an operation within a scope for the availMem function to return a fixed value within that scope. Will reset on exit.
Definition at line 25 of file MockMemory.h.
|
inline |
Patch the available memory while in scope.
| value | The amount of available memory, in kiB, that will be reported. Default 12 kiB. |
Definition at line 28 of file MockMemory.h.
References Mantid::TestMemory::enable_mem_override(), and m_value.
|
inline |
Definition at line 29 of file MockMemory.h.
References Mantid::TestMemory::disable_mem_override().
|
delete |
|
delete |
|
inline |
Definition at line 41 of file MockMemory.h.
References Mantid::TestMemory::g_fallback_bin_count.
|
delete |
References m_value.
|
delete |
|
private |
Definition at line 44 of file MockMemory.h.
Referenced by MockMemory(), and operator=().