Fixed incorrect memory allocations

This commit is contained in:
Eduard Urbach 2025-02-09 14:38:01 +01:00
parent 2b2e707520
commit ade1fd8fff
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
3 changed files with 5 additions and 5 deletions

View File

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

View File

@ -1,9 +1,9 @@
import sys import sys
alloc(length Int) -> Pointer { 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 return x
} }

View File

@ -1,9 +1,9 @@
import sys import sys
alloc(length Int) -> Pointer { 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 return x
} }