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

2019-01-08 Thread Lev Olshvang
Hi Lior thanks for your time and code example. Shachar Shemesh explained to me couple of simple things I forgotten. You can find his replies in this thread but the bottom line : I do not need to signal kernel.Kernel memory manager will discover that pages are not active ( each page have active

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

2019-01-07 Thread Lior Okman
On Fri, Dec 21, 2018 at 4:21 PM Lev Olshvang wrote: > > Hi All, > > I have an executable (C++) which is the exclusive user of the some shared > library that it uses only during the initialization phase. > > I would like to free memory used by this shared library, because I am > running on

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

2018-12-27 Thread Greg KH
On Thu, Dec 27, 2018 at 10:47:42AM +0300, Lev Olshvang wrote: > Hello Greg, > > Thanks for you your reply. > It help me to better express my question > > >From the application I can access /proc/self/maps and see which memory is > >mapped for my library I do not intend to use after

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

2018-12-26 Thread Lev Olshvang
Hello Greg, Thanks for you your reply. It help me to better express my question From the application I can access /proc/self/maps and see which memory is mapped for my library I do not intend to use after application passes init phase. I would like to unmap this memory region, but since I do

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

2018-12-21 Thread Bernd Petrovitsch
Hi all! On 21/12/2018 15:20, Lev Olshvang wrote: [...] > I have an executable (C++) which is the exclusive user of the some shared > library that it uses only during the initialization phase. > > I would like to free memory used by this shared library, because I am running > on embedded

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

2018-12-21 Thread Greg KH
On Fri, Dec 21, 2018 at 05:20:36PM +0300, Lev Olshvang wrote: > > Hi All, > > I have an executable (C++) which is the exclusive user of the some shared > library that it uses only during the initialization phase. > > I would like to free memory used by this shared library, because I am

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

2018-12-21 Thread Lev Olshvang
Hi All, I have an executable (C++) which is the exclusive user of the some shared library that it uses only during the initialization phase. I would like to free memory used by this shared library, because I am running on embedded system. How can I achieve this? I know that dlopen() will