Fixed incorrect memory allocations

This commit is contained in:
Eduard Urbach 2025-02-09 14:38:01 +01:00
parent 3043e4e2c4
commit 129a674c2e
Signed by: eduard
GPG key ID: 49226B848C78F6C8
3 changed files with 5 additions and 5 deletions

View file

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

View file

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

View file

@ -1,9 +1,9 @@
import sys
alloc(length Int) -> Pointer {
x := sys.mmap(0, length, 0x0004, 0x3000)
x := sys.mmap(0, length+8, 0x0004, 0x3000)
if x <= 0 {
if x < 0x1000 {
return x
}