Fix function argument ordering

This commit is contained in:
Krzosa Karol
2022-06-13 21:01:22 +02:00
parent 3bbe5e5c2b
commit 95235836fd
2 changed files with 10 additions and 1 deletions

View File

@@ -26,7 +26,12 @@ align_up :: (size: SizeU, align: SizeU): SizeU
reserve :: (size: SizeU): OS_Memory
result := OS_Memory{reserve=align_up(size, OS_PAGE_SIZE)}
result.data = VirtualAlloc(0, result.reserve, MEM_RESERVE, PAGE_READWRITE)->*U8
result.data = VirtualAlloc(
flProtect = PAGE_READWRITE,
dwSize = result.reserve,
flAllocationType = MEM_RESERVE,
lpAddress = 0,
)->*U8
return result
clamp_top_sizeu :: (val: SizeU, max: SizeU): SizeU
@@ -45,3 +50,5 @@ commit :: (m: *OS_Memory, size: SizeU): Bool
return true
return false
entry :: ()
memory := reserve(size = 10000)