1
0
mirror of https://github.com/momo5502/hypervisor.git synced 2025-07-04 10:11:51 +00:00

Better memory management

This commit is contained in:
momo5502
2022-03-27 11:57:26 +02:00
parent 520bdf3aea
commit 1bbd9e9c73
5 changed files with 114 additions and 56 deletions

18
src/driver/memory.hpp Normal file
View File

@ -0,0 +1,18 @@
#pragma once
namespace memory
{
_IRQL_requires_max_(DISPATCH_LEVEL)
void free_aligned_memory(void* memory);
_Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)
void* allocate_aligned_memory(size_t size);
_Must_inspect_result_
_IRQL_requires_max_(DISPATCH_LEVEL)
void* allocate_non_paged_memory(size_t size);
_IRQL_requires_max_(DISPATCH_LEVEL)
void free_non_paged_memory(void* memory);
}