small refactor and cleanup
This commit is contained in:
15
stdlib/mem.sl
Normal file
15
stdlib/mem.sl
Normal file
@@ -0,0 +1,15 @@
|
||||
import stdlib.sl
|
||||
|
||||
: alloc
|
||||
0 # addr hint (NULL)
|
||||
swap # size
|
||||
3 # prot (PROT_READ | PROT_WRITE)
|
||||
34 # flags (MAP_PRIVATE | MAP_ANON)
|
||||
-1 # fd
|
||||
0 # offset
|
||||
mmap
|
||||
;
|
||||
|
||||
: free
|
||||
munmap drop
|
||||
;
|
||||
Reference in New Issue
Block a user