Fixed memory allocation on MacOS
This commit is contained in:
parent
de223908d7
commit
81b0cd813c
5
lib/mem/alloc_linux.q
Normal file
5
lib/mem/alloc_linux.q
Normal file
@ -0,0 +1,5 @@
|
||||
import sys
|
||||
|
||||
alloc(length Int) -> Pointer {
|
||||
return sys.mmap(0, length, 0x1|0x2, 0x02|0x20)
|
||||
}
|
5
lib/mem/alloc_mac.q
Normal file
5
lib/mem/alloc_mac.q
Normal file
@ -0,0 +1,5 @@
|
||||
import sys
|
||||
|
||||
alloc(length Int) -> Pointer {
|
||||
return sys.mmap(0, length, 0x1|0x2, 0x02|0x1000)
|
||||
}
|
@ -1,9 +1,5 @@
|
||||
import sys
|
||||
|
||||
alloc(length Int) -> Pointer {
|
||||
return sys.mmap(0, length, 0x1|0x2, 0x02|0x20|0x100)
|
||||
}
|
||||
|
||||
free(address Pointer, length Int) -> Int {
|
||||
return sys.munmap(address, length)
|
||||
}
|
Loading…
Reference in New Issue
Block a user