Improved Windows support
This commit is contained in:
5
lib/mem/alloc_windows.q
Normal file
5
lib/mem/alloc_windows.q
Normal file
@ -0,0 +1,5 @@
|
||||
import sys
|
||||
|
||||
alloc(length Int) -> Pointer {
|
||||
return sys.mmap(0, length, 0x0004, 0x3000)
|
||||
}
|
@ -8,6 +8,10 @@ mmap(address Int, length Int, protection Int, flags Int) -> Pointer {
|
||||
return kernel32.VirtualAlloc(address, length, flags, protection)
|
||||
}
|
||||
|
||||
munmap(address Pointer, length Int) -> Int {
|
||||
return kernel32.VirtualFree(address, length, 0x4000)
|
||||
}
|
||||
|
||||
exit(code Int) {
|
||||
kernel32.ExitProcess(code)
|
||||
}
|
Reference in New Issue
Block a user