mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-04 00:00:14 -04:00
While some increase was necessary anyway because the idle system requires about 5-10 MiB more memory, the main issue is resolving the code line and function name in case of a memory leak. Calling addr2line requires a lot more memory than before. Using backtraces via libbfd doesn't help either because the trigger is the bfd_find_nearest_line() call we use as well. And because we'd try to resolve all symbols that way (for whitelisting), the memory overhead would be even higher and affect every shutdown, even if no leak occurred. It also causes a significant time overhead (running all tests took 75m instead of 48m). I also tested switching to ASAN/LSAN. The peak memory usage is slightly higher than when using libbfd, but enabling it also increased the runtime overhead a lot (the daemon and swanctl both required about 10-20 MiB more memory, not just during the shutdown).