mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
AK: Fix BumpAllocator.h compilation errors on Windows
This commit is contained in:
committed by
Jelle Raaijmakers
parent
03ac6e6e87
commit
0a90143420
@@ -13,8 +13,8 @@
|
|||||||
#if !defined(AK_OS_WINDOWS)
|
#if !defined(AK_OS_WINDOWS)
|
||||||
# include <sys/mman.h>
|
# include <sys/mman.h>
|
||||||
#else
|
#else
|
||||||
extern "C" __declspec(dllimport) void* __stdcall VirtualAlloc(size_t dwSize, u32 flAllocationType, u32 flProtect);
|
extern "C" __declspec(dllimport) void* __stdcall VirtualAlloc(void* lpAddress, size_t size, u32 flAllocationType, u32 flProtect);
|
||||||
extern "C" __declspec(dllimport) bool __stdcall VirtualFree(void* lpAddress, size_t dwSize, u32 dwFreeType);
|
extern "C" __declspec(dllimport) bool __stdcall VirtualFree(void* lpAddress, size_t size, u32 dwFreeType);
|
||||||
# define MEM_COMMIT 0x00001000
|
# define MEM_COMMIT 0x00001000
|
||||||
# define PAGE_READWRITE 0x04
|
# define PAGE_READWRITE 0x04
|
||||||
# define MEM_RELEASE 0x00008000
|
# define MEM_RELEASE 0x00008000
|
||||||
@@ -82,7 +82,7 @@ public:
|
|||||||
|
|
||||||
if constexpr (use_mmap) {
|
if constexpr (use_mmap) {
|
||||||
#if defined(AK_OS_WINDOWS)
|
#if defined(AK_OS_WINDOWS)
|
||||||
VirtualFree((LPVOID)chunk, m_chunk_size, MEM_RELEASE);
|
VirtualFree((void*)chunk, m_chunk_size, MEM_RELEASE);
|
||||||
#else
|
#else
|
||||||
munmap((void*)chunk, m_chunk_size);
|
munmap((void*)chunk, m_chunk_size);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user