Lock memory allocated from upstream memory resource using specified LockFlag.
More...
#include <numapp/memory.hpp>
|
| | LockResource (LockFlag flag) noexcept |
| | Initialize with specified flag and upstream memory resource initialized from std::pmr::get_default_resource().
|
| |
| | LockResource (std::pmr::memory_resource *upstream) noexcept |
| | Initialize with specified upstream memory resource using LockFlag::PreFault.
|
| |
| | LockResource (LockFlag flag, std::pmr::memory_resource *upstream) noexcept |
| | Initialize with specified lock flag and upstream memory resource.
|
| |
|
virtual | ~LockResource ()=default |
| | Destroy LockResource.
|
| |
|
LockResource & | operator= (LockResource const &)=delete |
| | LockResource is not copy assignable.
|
| |
| auto | GetFlags () const noexcept -> LockFlag |
| | Get lock flag in use.
|
| |
| auto | GetUpstream () const noexcept -> std::pmr::memory_resource * |
| | Get upstream memory resource.
|
| |
Lock memory allocated from upstream memory resource using specified LockFlag.
- Note
- If locking fails memory is deallocated and
std::system_error exception is thrown.
Definition at line 406 of file memory.hpp.
◆ LockResource() [1/3]
| numapp::LockResource::LockResource |
( |
LockFlag | flag | ) |
|
|
noexcept |
Initialize with specified flag and upstream memory resource initialized from std::pmr::get_default_resource().
- Parameters
-
| flag | Lock flag controlling memory locking behavior. |
Definition at line 282 of file memory.cpp.
◆ LockResource() [2/3]
| numapp::LockResource::LockResource |
( |
std::pmr::memory_resource * | upstream | ) |
|
|
noexcept |
Initialize with specified upstream memory resource using LockFlag::PreFault.
- Parameters
-
| upstream | Upstream memory resource from where allocations are delegated; must point to valid memory resource. |
Definition at line 286 of file memory.cpp.
◆ LockResource() [3/3]
| numapp::LockResource::LockResource |
( |
LockFlag | flag, |
|
|
std::pmr::memory_resource * | upstream ) |
|
noexcept |
Initialize with specified lock flag and upstream memory resource.
- Parameters
-
| flag | Lock flag controlling memory locking behavior. |
| upstream | Upstream memory resource from where allocations are delegated; must point to valid memory resource. |
Definition at line 291 of file memory.cpp.
◆ GetFlags()
| auto numapp::LockResource::GetFlags |
( |
| ) |
const -> LockFlag |
|
noexcept |
Get lock flag in use.
- Returns
- Lock flags.
Definition at line 318 of file memory.cpp.
◆ GetUpstream()
| auto numapp::LockResource::GetUpstream |
( |
| ) |
const -> std::pmr::memory_resource* |
|
noexcept |
Get upstream memory resource.
- Returns
- Upstream memory resoure.
Definition at line 322 of file memory.cpp.
The documentation for this class was generated from the following files: