Fixed incorrect memory allocations
This commit is contained in:
parent
3043e4e2c4
commit
129a674c2e
3 changed files with 5 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue