[compiler-rt] [scudo] Add primary option to zero block on dealloc. (PR #142394)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 5 06:52:07 PDT 2025


piwicode wrote:

> The underlying issue is that this change is fuchsia kernel specific. It will not help anything but that one kernel. That's why the proposal was that you use some of the extensions to do this in fuchsia specific code instead of adding a lot of code for an option that isn't very useful to other platforms.

Zeroing memory is beneficial to all opearating system with zram. On linux pages full of repeated values are stored efficintly as metadata by zram implementation. Hence it is not Fuchsia kernel specific.

> Especially the fact that this only applies to the primary, and might cause other issues if you don't want this to apply to larger primary allocations (many configs have primary allocations up to 65KB allocations or larger).

We can make it happen in the combined allocator, and make the option be a size below which one the allocations are zeroed. Does that help?


https://github.com/llvm/llvm-project/pull/142394


More information about the llvm-commits mailing list