[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: vhu7xjrhu58g1.jpg (156 KB, 1093x1200)
156 KB
156 KB JPG
previous: >>107851217

#define __NR_munmap                11


a 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 it

relevant resources:
man man

man syscalls

https://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/
>>
poor munmap
so 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 termination
Why not?
>>
>>107861083
How would that be better in any way?
Why not just use a dedicated function for what you want to accomplish?
>>
>>107861106
We can obviously, munmap is for the case that you want to free memory before process termination.

>>107861115
Why 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 syscall
Somehow someone already did.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.