Re: How to signal kernel that shared library is not in use by any process anymore ?

Shachar Shemesh <[email protected]> Fri, 4 Jan 2019 21:29:03 +0200
Newsgroups gmane.linux.region.israel
Message-ID <[email protected]>
On 27/12/2018 15:34, Lev Olshvang
wrote:

Can you elaborate why I can not write new system call to unmap
this memory regions, which I see in /proc/self/maps by force ?

Why would you need a system call to do this?

Well, obviously, you'd need a system call to do this, but why
can't that system call be "munmap"? Especially since you already
pointed out that you know which pages you want unmapped.

This is especially true, and this is also something that people
seem to miss, considering that it wasn't the kernel that mapped
those pages in to begin with. Those pages were mapped by the
dynamic linker. It typically resides in /lib/ld-linux.so.2 or
something (/lib64/ld-linux-x86-64.so.2 for more modern platforms),
and is 100% a user space function.

So I'm still not sure why you insist on unmapping, but even if
you do, I don't see why you'd need a new system call to do it.

Shachar

_______________________________________________
Linux-il mailing list
[email protected]
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il