Implemented length storage of allocated memory
This commit is contained in:
parent
1ff56e0856
commit
2b2e707520
27 changed files with 134 additions and 49 deletions
|
@ -1,5 +1,12 @@
|
|||
import sys
|
||||
|
||||
alloc(length Int) -> Pointer {
|
||||
return sys.mmap(0, length, 0x0004, 0x3000)
|
||||
x := sys.mmap(0, length, 0x0004, 0x3000)
|
||||
|
||||
if x <= 0 {
|
||||
return x
|
||||
}
|
||||
|
||||
store(x, 8, length)
|
||||
return x + 8
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue