12 lines
156 B
Plaintext
Raw Normal View History

2024-08-19 17:25:51 +02:00
import sys
alloc(length Int) -> Pointer {
2025-02-09 14:38:01 +01:00
x := sys.mmap(0, length+8, 0x0004, 0x3000)
2025-02-09 14:38:01 +01:00
if x < 0x1000 {
return x
}
store(x, 8, length)
return x + 8
2024-08-19 17:25:51 +02:00
}