Implemented const keyword
This commit is contained in:
parent
5f37a9e84a
commit
91a3ec9d52
21 changed files with 164 additions and 26 deletions
|
@ -1,7 +1,16 @@
|
|||
import sys
|
||||
|
||||
const page {
|
||||
readwrite 0x0004
|
||||
}
|
||||
|
||||
const mem {
|
||||
commit 0x1000
|
||||
reserve 0x2000
|
||||
}
|
||||
|
||||
alloc(length Int) -> []Int8 {
|
||||
x := sys.mmap(0, length+8, 0x0004, 0x3000)
|
||||
x := sys.mmap(0, length+8, page.readwrite, mem.commit|mem.reserve)
|
||||
|
||||
if x < 0x1000 {
|
||||
return x
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue