Fixed incorrect const values
This commit is contained in:
parent
04ece57b27
commit
1ca61190eb
22 changed files with 93 additions and 92 deletions
12
lib/mem/alloc_unix.q
Normal file
12
lib/mem/alloc_unix.q
Normal file
|
@ -0,0 +1,12 @@
|
|||
import sys
|
||||
|
||||
alloc(length int) -> []byte {
|
||||
x := sys.mmap(0, length+8, prot.read|prot.write, map.private|map.anonymous)
|
||||
|
||||
if x < 0x1000 {
|
||||
return x
|
||||
}
|
||||
|
||||
store(x, 8, length)
|
||||
return x + 8
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue