blob: 7264a35b48e5651970c1343b472223afaaa93ecc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include "kernel/test_support/simulated_memory.hpp"
#include <kstd/units>
#include <cstddef>
#include <vector>
namespace kernel::tests
{
simulated_memory::simulated_memory(kstd::units::bytes size)
: m_memory{size / kstd::units::bytes{1}}
{}
auto simulated_memory::ram_base() noexcept -> std::byte *
{
return m_memory.data();
}
auto simulated_memory::ram_base() const noexcept -> std::byte const *
{
return m_memory.data();
}
auto simulated_memory::clear() -> void
{
m_memory.clear();
}
} // namespace kernel::tests
|