diff options
| author | bunnei <bunneidev@gmail.com> | 2021-01-01 02:54:01 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-01 02:54:01 -0800 |
| commit | f1195d12cc8aaff20654e7dac73dd5afaa059478 (patch) | |
| tree | 95a401077534f48f0e6a92a269321ff9ad7aec45 /src/common/virtual_buffer.h | |
| parent | 500b73739ae7676f42290bdf4a6bada182854877 (diff) | |
| parent | 8bfa4d6dbf196dcde5f7348f668e730d8506f4fb (diff) | |
Merge pull request #5249 from ReinUsesLisp/lock-free-pages
core/memory: Read and write page table atomically
Diffstat (limited to 'src/common/virtual_buffer.h')
| -rw-r--r-- | src/common/virtual_buffer.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/common/virtual_buffer.h b/src/common/virtual_buffer.h index 91d4300360..fb1a6f81f6 100644 --- a/src/common/virtual_buffer.h +++ b/src/common/virtual_buffer.h @@ -15,10 +15,12 @@ void FreeMemoryPages(void* base, std::size_t size) noexcept; template <typename T> class VirtualBuffer final { public: - static_assert( - std::is_trivially_constructible_v<T>, - "T must be trivially constructible, as non-trivial constructors will not be executed " - "with the current allocator"); + // TODO: Uncomment this and change Common::PageTable::PageInfo to be trivially constructible + // using std::atomic_ref once libc++ has support for it + // static_assert( + // std::is_trivially_constructible_v<T>, + // "T must be trivially constructible, as non-trivial constructors will not be executed " + // "with the current allocator"); constexpr VirtualBuffer() = default; explicit VirtualBuffer(std::size_t count) : alloc_size{count * sizeof(T)} { |
