libselinux: Reduce memory needed in libselinux
PATCH 1/1 libselinux: Reduce memory needed in libselinux
libselinux has a dependency to libpcre2, which seems
to require more memory. Use the introduced AGGRESSIVE_FREE_AFTER_REGEX_MATCH preprocessor ifndef to have reduced memory usage in libselinux itself.
The workaround with AGGRESSIVE_FREE_AFTER_REGEX_MATCH was introduced to libselinux with the following commit:
https://github.com/SELinuxProject/selinux/commit/30b3e9d25f417cf62f0d87d2c516c34555b28b32
--- recipes-security/selinux/libselinux_3.10.bb | 2 ++ 1 file changed, 2 insertions(+)
recipes-security/selinux/libselinux_3.10.bb +2 -0
@@ -28,6 +28,8 @@ def get_policyconfigarch(d): EXTRA_OEMAKE = "${@get_policyconfigarch(d)}" EXTRA_OEMAKE:append:libc-musl = " FTS_LDLIBS=-lfts" +CFLAGS:append = " -DAGGRESSIVE_FREE_AFTER_REGEX_MATCH" + # LTO fat objects in static library embed original source paths in .gnu.lto_* IR # sections which are not affected by -ffile-prefix-map, causing buildpaths QA failure LTO = ""
Signature · 1 line
2.43.0
Hi all,
please let me know if you want take this patch or have any suggestions for improving it.
Thanks,
Yannik
Hi Joe MacDonald,
please let me know if you have any suggestions for improving the commit. Or if you are not interested in taking this commit.
Thanks,
Yannik
A message that is not in the archive (sent off-list or not yet received): [email protected]
we noticed that the memory consumption of libselinux went up significantly after an update. During testing we tried out this flag which lowered it again.
Could you please have a look if we can merge the same patch for wrynose? Thanks!
https://lists.yoctoproject.org/g/yocto-patches/message/4650
Regards,
Yannik
Hi Yi Zhao,
please let me know if you have any suggestions for improving the commit.
Thanks,
Yannik