Expedited memory reclaim from killed processes
Expedited memory reclaim from killed processes
Posted Apr 15, 2019 17:03 UTC (Mon) by rweikusat2 (subscriber, #117920)In reply to: Expedited memory reclaim from killed processes by Cyberax
Parent article: Expedited memory reclaim from killed processes
This statement means nothing (as it stands).
> A better designed software would store rules in a file and map it explicitly into the target processes. This way there's no problem
> with overcommit - the kernel would know that the data is meant to be immutable.
A much more invasive change to suricata (this is an open source project I'm not anyhow associated with) could have gotten rid of all the pointers in its internal data structures. Assuming this had been done and the code had also been changed to use a custom memory allocator instead of the libc one, one could have used a shared memory segment/ memory mapped file to implement the same kind of sharing. I'm perfectly aware of this. But this complication isn't really necessary with Linux as sharing-via-fork works just as well and is a lot easier to implement.