16 lines
415 B
Plaintext
Raw Normal View History

2025-02-12 00:04:30 +01:00
extern kernel32 {
VirtualAlloc(address Int, length Int, flags Int, protection Int)
VirtualFree(address *Any, length Int, type Int) -> Bool
}
2025-02-15 14:38:01 +01:00
const mem {
decommit 0x4000
}
2025-02-09 23:52:07 +01:00
mmap(address Int, length Int, protection Int, flags Int) -> *Any {
2024-08-19 11:11:45 +02:00
return kernel32.VirtualAlloc(address, length, flags, protection)
2024-08-15 13:53:00 +02:00
}
2025-02-09 23:52:07 +01:00
munmap(address *Any, length Int) -> Int {
2025-02-15 14:38:01 +01:00
return kernel32.VirtualFree(address, length, mem.decommit)
2024-08-13 19:34:54 +02:00
}