RE: [PATCH] libsemanage: free policydb before fork

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joshua Brindle wrote:
> Interestingly this works sometimes and not others. I suppose it
> depends on whether the libc allocator feels like giving up the memory
> when we free the policydb or not. I am not sure what the best way to
> address this is, any ideas?

You might try calling malloc_stats() before you free the policydb and
see how the stats differ in the two cases.  We may also be able to tune
malloc via mallopt().  I would guess that mmap()'d data is more likely
to be returned to the system so we might try reducing M_MMAP_THRESHOLD
from 128K to a smaller amount (maybe try 64K).  The flip side of this
is M_TRIM_THRESHOLD (which also defaults to 128K).  A lower value of
M_TRIM_THRESHOLD will result in malloc() returning sbrk()'d memory
back to the system more often.  So, there are knobs we can twiddle--
I just don't know how likely they are to help.

 - todd


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux