|
@@ -341,6 +341,7 @@ MEM_TOP_DOWN :: 0x100000
|
|
MEM_LARGE_PAGES :: 0x20000000
|
|
MEM_LARGE_PAGES :: 0x20000000
|
|
MEM_4MB_PAGES :: 0x80000000
|
|
MEM_4MB_PAGES :: 0x80000000
|
|
|
|
|
|
|
|
+@(default_calling_convention="stdcall")
|
|
foreign kernel32 {
|
|
foreign kernel32 {
|
|
VirtualAlloc :: proc(
|
|
VirtualAlloc :: proc(
|
|
lpAddress: LPVOID,
|
|
lpAddress: LPVOID,
|
|
@@ -483,6 +484,7 @@ LowMemoryResourceNotification :: MEMORY_RESOURCE_NOTIFICATION_TYPE.LowMemoryRes
|
|
HighMemoryResourceNotification :: MEMORY_RESOURCE_NOTIFICATION_TYPE.HighMemoryResourceNotification
|
|
HighMemoryResourceNotification :: MEMORY_RESOURCE_NOTIFICATION_TYPE.HighMemoryResourceNotification
|
|
|
|
|
|
|
|
|
|
|
|
+@(default_calling_convention="stdcall")
|
|
foreign kernel32 {
|
|
foreign kernel32 {
|
|
CreateMemoryResourceNotification :: proc(
|
|
CreateMemoryResourceNotification :: proc(
|
|
NotificationType: MEMORY_RESOURCE_NOTIFICATION_TYPE,
|
|
NotificationType: MEMORY_RESOURCE_NOTIFICATION_TYPE,
|
|
@@ -498,6 +500,7 @@ FILE_CACHE_MAX_HARD_DISABLE :: DWORD(0x00000002)
|
|
FILE_CACHE_MIN_HARD_ENABLE :: DWORD(0x00000004)
|
|
FILE_CACHE_MIN_HARD_ENABLE :: DWORD(0x00000004)
|
|
FILE_CACHE_MIN_HARD_DISABLE :: DWORD(0x00000008)
|
|
FILE_CACHE_MIN_HARD_DISABLE :: DWORD(0x00000008)
|
|
|
|
|
|
|
|
+@(default_calling_convention="stdcall")
|
|
foreign kernel32 {
|
|
foreign kernel32 {
|
|
GetSystemFileCacheSize :: proc(
|
|
GetSystemFileCacheSize :: proc(
|
|
lpMinimumFileCacheSize: PSIZE_T,
|
|
lpMinimumFileCacheSize: PSIZE_T,
|
|
@@ -527,6 +530,7 @@ WIN32_MEMORY_RANGE_ENTRY :: struct {
|
|
|
|
|
|
PWIN32_MEMORY_RANGE_ENTRY :: ^WIN32_MEMORY_RANGE_ENTRY
|
|
PWIN32_MEMORY_RANGE_ENTRY :: ^WIN32_MEMORY_RANGE_ENTRY
|
|
|
|
|
|
|
|
+@(default_calling_convention="stdcall")
|
|
foreign kernel32 {
|
|
foreign kernel32 {
|
|
PrefetchVirtualMemory :: proc(
|
|
PrefetchVirtualMemory :: proc(
|
|
hProcess: HANDLE,
|
|
hProcess: HANDLE,
|
|
@@ -584,6 +588,7 @@ foreign kernel32 {
|
|
|
|
|
|
MEHC_PATROL_SCRUBBER_PRESENT :: ULONG(0x1)
|
|
MEHC_PATROL_SCRUBBER_PRESENT :: ULONG(0x1)
|
|
|
|
|
|
|
|
+@(default_calling_convention="stdcall")
|
|
foreign kernel32 {
|
|
foreign kernel32 {
|
|
GetMemoryErrorHandlingCapabilities :: proc(
|
|
GetMemoryErrorHandlingCapabilities :: proc(
|
|
Capabilities: PULONG,
|
|
Capabilities: PULONG,
|
|
@@ -592,6 +597,7 @@ foreign kernel32 {
|
|
|
|
|
|
PBAD_MEMORY_CALLBACK_ROUTINE :: #type proc "stdcall" ()
|
|
PBAD_MEMORY_CALLBACK_ROUTINE :: #type proc "stdcall" ()
|
|
|
|
|
|
|
|
+@(default_calling_convention="stdcall")
|
|
foreign kernel32 {
|
|
foreign kernel32 {
|
|
RegisterBadMemoryNotification :: proc(
|
|
RegisterBadMemoryNotification :: proc(
|
|
Callback: PBAD_MEMORY_CALLBACK_ROUTINE,
|
|
Callback: PBAD_MEMORY_CALLBACK_ROUTINE,
|
|
@@ -612,6 +618,7 @@ VmOfferPriorityLow :: OFFER_PRIORITY.VmOfferPriorityLow
|
|
VmOfferPriorityBelowNormal :: OFFER_PRIORITY.VmOfferPriorityBelowNormal
|
|
VmOfferPriorityBelowNormal :: OFFER_PRIORITY.VmOfferPriorityBelowNormal
|
|
VmOfferPriorityNormal :: OFFER_PRIORITY.VmOfferPriorityNormal
|
|
VmOfferPriorityNormal :: OFFER_PRIORITY.VmOfferPriorityNormal
|
|
|
|
|
|
|
|
+@(default_calling_convention="stdcall")
|
|
foreign kernel32 {
|
|
foreign kernel32 {
|
|
OfferVirtualMemory :: proc(
|
|
OfferVirtualMemory :: proc(
|
|
VirtualAddress: PVOID,
|
|
VirtualAddress: PVOID,
|
|
@@ -676,6 +683,7 @@ WIN32_MEMORY_REGION_INFORMATION_u_s_Bitfield :: distinct ULONG
|
|
Reserved : 32-6,
|
|
Reserved : 32-6,
|
|
}*/
|
|
}*/
|
|
|
|
|
|
|
|
+@(default_calling_convention="stdcall")
|
|
foreign kernel32 {
|
|
foreign kernel32 {
|
|
QueryVirtualMemoryInformation :: proc(
|
|
QueryVirtualMemoryInformation :: proc(
|
|
Process: HANDLE,
|
|
Process: HANDLE,
|
|
@@ -700,7 +708,7 @@ foreign kernel32 {
|
|
|
|
|
|
NUMA_NO_PREFERRED_NODE :: 0xffffffff
|
|
NUMA_NO_PREFERRED_NODE :: 0xffffffff
|
|
|
|
|
|
-MapViewOfFile2 :: #force_inline proc(
|
|
|
|
|
|
+MapViewOfFile2 :: #force_inline proc "stdcall" (
|
|
FileMappingHandle: HANDLE,
|
|
FileMappingHandle: HANDLE,
|
|
ProcessHandle: HANDLE,
|
|
ProcessHandle: HANDLE,
|
|
Offset: ULONG64,
|
|
Offset: ULONG64,
|
|
@@ -721,6 +729,7 @@ MapViewOfFile2 :: #force_inline proc(
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+@(default_calling_convention="stdcall")
|
|
foreign kernel32 {
|
|
foreign kernel32 {
|
|
UnmapViewOfFile2 :: proc(
|
|
UnmapViewOfFile2 :: proc(
|
|
ProcessHandle: HANDLE,
|
|
ProcessHandle: HANDLE,
|