12 lines
160 B
Plaintext

import sys
alloc(length Int) -> Pointer {
x := sys.mmap(0, length+8, 0x1|0x2, 0x02|0x20)
if x < 0x1000 {
return x
}
store(x, 8, length)
return x + 8
}