| 721 | } |
| 722 | |
| 723 | void vm::reset() { |
| 724 | std::memset(gBlocks, 0, sizeof(gBlocks)); |
| 725 | |
| 726 | rx::mem::unmap(reinterpret_cast<void *>(kMinAddress), |
| 727 | kMaxAddress - kMinAddress); |
| 728 | if (::ftruncate64(gMemoryShm, 0) < 0) { |
| 729 | std::abort(); |
| 730 | } |
| 731 | if (::ftruncate64(gMemoryShm, kMemorySize) < 0) { |
| 732 | std::abort(); |
| 733 | } |
| 734 | |
| 735 | reserve(0, kMinAddress); |
| 736 | rx::mem::reserve(reinterpret_cast<void *>(kMinAddress), |
| 737 | kMaxAddress - kMinAddress); |
| 738 | } |
| 739 | |
| 740 | void vm::initialize(std::uint64_t pid) { |
| 741 | std::println("Memory: initialization"); |
no test coverage detected