summaryrefslogtreecommitdiffstats
path: root/src/common/virtual_buffer.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* virtual_buffer: Do nothing on resize() calls with same sizesLioncash2020-11-191-1/+6
| | | | | Prevents us from churning memory by freeing and reallocating a memory block that would have already been adequate as is.
* virtual_buffer: Add compile-time type-safety guarantees with VirtualBufferLioncash2020-11-181-0/+6
| | | | | | | | | VirtualBuffer makes use of VirtualAlloc (on Windows) and mmap() (on other platforms). Neither of these ensure that non-trivial objects are properly constructed in the allocated memory. To prevent potential undefined behavior occurring due to that, we can add a static assert to loudly complain about cases where that is done.
* page_table: Allow page tables to be movedLioncash2020-11-181-5/+18
| | | | | | | | Makes page tables and virtual buffers able to be moved, but not copied, making the interface more flexible. Previously, with the destructor specified, but no move assignment or constructor specified, they wouldn't be implicitly generated.
* common: Make use of [[nodiscard]] where applicableLioncash2020-08-151-5/+5
| | | | | | Now that clang-format makes [[nodiscard]] attributes format sensibly, we can apply them to several functions within the common library to allow the compiler to complain about any misuses of the functions.
* common: Add VirtualBuffer class, to abstract memory virtualization.bunnei2020-04-171-0/+58