On 23/12/2018 09:49, Lev Olshvang
wrote:
First, yes, it will have a use count of more than zero. So what? All the pages are clean, and have a file that has a copy. The kernel will gladly remove them from memory despite being mapped (unless you mlock them, that is). If, as you say, they are not used after init, then nothing will fault them and cause them to come back.
I am not that lazy,It's not about being lazy. It's about opening yourself up for introducing bugs. I wouldn't do that.
Assuming you're still not convinced, here's what I would
do: Write your own library (liblevinit.so). Put all the calls that
need to go into that other library into liblevinit.so. dlopen and
dlsym lev init, call the trigger function, and then dlclose it.
You now have to manage only one symbol, and
Like I said above, I don't think that is necessary. If you want to be paranoid about it, however, that's what I'd do.
Shachar |
_______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il