diff options
author | Christian Cunningham <cc@localhost> | 2024-07-14 09:16:39 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2024-07-14 09:16:39 -0700 |
commit | 8caa5e7cafb686ac215eb4d1eb56f8a953ea11f4 (patch) | |
tree | 9ba811f89f0940988b7bb5e577a0a6463a45cee2 /alloc.inc | |
parent | 28fbc837eaff40b0f992233e583f8352f13dddfe (diff) |
Whitespace Formatting
Diffstat (limited to 'alloc.inc')
-rw-r--r-- | alloc.inc | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4,21 +4,21 @@ %include "sys.inc" %endif -%macro alloc 1 - mov rax, SYS_MMAP +%macro alloc 0-1 rax xor rdi, rdi ; Let Kernel give Address mov rsi, %1 ; Size to allocate mov rdx, 3 ; PROT_READ | PROT_WRITE mov r10, 0x1002 ; MAP_PRIVATE | MAP_ANONYMOUS xor r8, r8 ; fd = -1, Not backed by a file xor r9, r9 ; offset = 0 + mov rax, SYS_MMAP syscall %endm -%macro free 2 - mov rax, SYS_MUNMAP +%macro free 1-2 rax mov rdi, %1 ; Address to free mov rsi, %2 ; Size allocated + mov rax, SYS_MUNMAP syscall %endm |