previous: >>107851217#define __NR_munmap 11a little bit of a boring one, today. here we just have the complement of mmap. still, what goes up must come down. we can't just let the kernel do everything for us on process termination. when it comes time to unmap memory, we at least have a consistent api for itrelevant resources: man manman syscallshttps://man7.org/linux/man-pages/https://linux.die.net/man/https://elixir.bootlin.com/linux/https://elixir.bootlin.com/musl/https://elixir.bootlin.com/glibc/
#define __NR_munmap 11
man man
man syscalls
poor munmapso boring, no one wants to talk about you
why not just reuse mmap with a flag for "deallocate" or something?
>>107860495>we can't just let the kernel do everything for us on process terminationWhy not?
>>107861083How would that be better in any way?Why not just use a dedicated function for what you want to accomplish?
>>107861106We can obviously, munmap is for the case that you want to free memory before process termination.>>107861115Why not use a dedicated function for, idk, mapping anonymous memory? Somehow you need to decide whether something goes in a new flag or a new syscall
Will you start doing non-POSIX, non-Linux OS's syscalls once you went through all the standard Linux ones? Neurosuggesting you keep up the good effort for that long.
>>107861140>Somehow you need to decide whether something goes in a new flag or a new syscallSomehow someone already did.