mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-07-04 10:11:51 +00:00
Don't allocate all vm state in a continuous block
This commit is contained in:
@ -9,6 +9,15 @@ namespace memory
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
void* allocate_aligned_memory(size_t size);
|
||||
|
||||
_Must_inspect_result_
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
|
||||
template <typename T>
|
||||
T* allocate_aligned_object()
|
||||
{
|
||||
return static_cast<T*>(allocate_aligned_memory(sizeof(T)));
|
||||
}
|
||||
|
||||
uint64_t get_physical_address(void* address);
|
||||
void* get_virtual_address(uint64_t address);
|
||||
|
||||
|
Reference in New Issue
Block a user