mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
AK: Fix BumpAllocator.h compilation errors on Windows
This commit is contained in:
parent
03ac6e6e87
commit
0a90143420
Notes:
github-actions[bot]
2024-12-14 15:13:04 +00:00
Author: https://github.com/stasoid Commit: https://github.com/LadybirdBrowser/ladybird/commit/0a901434208 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2911
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue