Fixed incorrect const values
This commit is contained in:
parent
04ece57b27
commit
1ca61190eb
22 changed files with 93 additions and 92 deletions
|
@ -1,7 +1,9 @@
|
|||
import sys
|
||||
extern kernel32 {
|
||||
VirtualAlloc(address int, size uint, flags uint32, protection uint32) -> *any
|
||||
}
|
||||
|
||||
alloc(length int) -> []byte {
|
||||
x := sys.mmap(0, length+8, page.readwrite, mem.commit|mem.reserve)
|
||||
x := kernel32.VirtualAlloc(0, length+8, mem.commit|mem.reserve, page.readwrite)
|
||||
|
||||
if x < 0x1000 {
|
||||
return x
|
||||
|
@ -9,13 +11,4 @@ alloc(length int) -> []byte {
|
|||
|
||||
store(x, 8, length)
|
||||
return x + 8
|
||||
}
|
||||
|
||||
const page {
|
||||
readwrite 0x0004
|
||||
}
|
||||
|
||||
const mem {
|
||||
commit 0x1000
|
||||
reserve 0x2000
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue