|
NUMA++ 0.12.0
|
Contains declarations for numapp::MemPolicy. More...
#include <numapp/config.hpp>#include <iosfwd>#include <memory>#include <numaif.h>#include <optional>#include <system_error>#include <numapp/flags.hpp>#include <numapp/nodemask.hpp>Go to the source code of this file.
Classes | |
| class | numapp::MemPolicy |
| Class representing a memory policy that can be modified and used to apply to the current thread or a memory range. More... | |
| class | numapp::ScopedMemPolicy |
| Applies memory policy to this thread at construction and reverts to previous at destruction. More... | |
Functions | |
Apply Memory Policy to Current Thread | |
Applies default memory policy to calling thread or to thread stack memory. | |
| std::error_code | numapp::thisThread::Apply (MemPolicy const &policy) noexcept |
| Applies the default memory policy to the calling thread. | |
| std::error_code | numapp::thisThread::ApplyStack (MemPolicy const &policy, MemPolicyFlag flags=MemPolicyFlag::Move|MemPolicyFlag::Strict) noexcept |
| Convenience function that applies a memory policy to current thread stack memory. | |
Apply Memory Policy to Memory Range | |
| std::error_code | numapp::Apply (void *address, std::size_t length, MemPolicy const &policy, MemPolicyFlag flags) noexcept |
| Applies memory policy to the memory pages that spans the range [address, adress + length]. | |
Contains declarations for numapp::MemPolicy.
SPDX-License-Identifier: LGPL-3.0-only
Definition in file mempolicy.hpp.
|
nodiscardnoexcept |
Applies memory policy to the memory pages that spans the range [address, adress + length].
Read related man-page of mbind() to understand the various behaviours if memory is mapped or shared.
| address | start of address range. |
| length | length of range. |
| policy | Policy to apply. |
| flags | combination of MemPolicyFlag values that modify the behaviour. |