3 ms·
why do we need to JIT the munmap code? Can we not just call munmap(2)
by fierro 7y ago
why do we need to JIT the munmap code? Can we not just call munmap(2)
- spc476 7y agoThe 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.