4 ms·
The call to munmap() requires both a stack (which will be unmapped at some point) and the code from libc (which will be unmapped at some time). The program get
by spc476 7y ago
The call to munmap() requires both a stack (which will be unmapped at some point) and the code from libc (which will be unmapped at some time).
The program gets a list of all the allocated pages first, then creates one more for the JIT code (and a copy of the list) which is unmapped as the last thing it does. There really is no other way of doing it.