malloc: Change calloc when tagging is disabled
commit9d61722b599a02a6d3caed1d75417a7f5e661693
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Tue, 16 Feb 2021 17:02:44 +0000 (16 17:02 +0000)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 26 Mar 2021 11:03:06 +0000 (26 11:03 +0000)
tree565e05bea7b1b44d556a197525d9ac5a3e43dc63
parentc076a0bc698c537f72c33bad2925f4e3da59d23c
malloc: Change calloc when tagging is disabled

When glibc is built with memory tagging support (USE_MTAG) but it is not
enabled at runtime (mtag_enabled) then unconditional memset was used
even though that can be often avoided.

This is for performance when tagging is supported but not enabled.
The extra check should have no overhead: tag_new_zero_region already
had a runtime check which the compiler can now optimize away.

Reviewed-by: DJ Delorie <dj@redhat.com>
malloc/malloc.c