Fixed incorrect memory allocations
This commit is contained in:
parent
2b2e707520
commit
ade1fd8fff
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user