[Memory] Close shared memory FD and properly handle its invalid value

This commit is contained in:
Triang3l
2020-11-22 14:17:37 +03:00
parent 432369ae84
commit 86ae42919d
7 changed files with 30 additions and 19 deletions

View File

@@ -100,7 +100,8 @@ class X64CodeCache : public CodeCache {
UnwindReservation unwind_reservation) {}
std::filesystem::path file_name_;
xe::memory::FileMappingHandle mapping_ = nullptr;
xe::memory::FileMappingHandle mapping_ =
xe::memory::kFileMappingHandleInvalid;
// NOTE: the global critical region must be held when manipulating the offsets
// or counts of anything, to keep the tables consistent and ordered.