Improved type system
This commit is contained in:
@ -10,7 +10,7 @@ const map {
|
||||
anonymous 0x20
|
||||
}
|
||||
|
||||
alloc(length Int) -> []Int8 {
|
||||
alloc(length int) -> []int8 {
|
||||
x := sys.mmap(0, length+8, prot.read|prot.write, map.private|map.anonymous)
|
||||
|
||||
if x < 0x1000 {
|
||||
|
@ -10,7 +10,7 @@ const map {
|
||||
anonymous 0x1000
|
||||
}
|
||||
|
||||
alloc(length Int) -> []Int8 {
|
||||
alloc(length int) -> []int8 {
|
||||
x := sys.mmap(0, length+8, prot.read|prot.write, map.private|map.anonymous)
|
||||
|
||||
if x < 0x1000 {
|
||||
|
@ -9,7 +9,7 @@ const mem {
|
||||
reserve 0x2000
|
||||
}
|
||||
|
||||
alloc(length Int) -> []Int8 {
|
||||
alloc(length int) -> []int8 {
|
||||
x := sys.mmap(0, length+8, page.readwrite, mem.commit|mem.reserve)
|
||||
|
||||
if x < 0x1000 {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import sys
|
||||
|
||||
free(address []Any) -> Int {
|
||||
free(address []any) -> int {
|
||||
return sys.munmap(address-8, len(address)+8)
|
||||
}
|
Reference in New Issue
Block a user