malloc: Ensure mtag code path in checked_request2size is cold
commit850dbf24ee04c1e462640b87dbe1c6044fbe65e2
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Mon, 15 Mar 2021 11:44:32 +0000 (15 11:44 +0000)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Fri, 26 Mar 2021 11:03:06 +0000 (26 11:03 +0000)
tree404dddbadcfa97a4c01aaf54406235bd7a8298a6
parent05f878c58e53370a76c2b82679899936bc69c714
malloc: Ensure mtag code path in checked_request2size is cold

This is a workaround (hack) for a gcc optimization issue (PR 99551).
Without this the generated code may evaluate the expression in the
cold path which causes performance regression for small allocations
in the memory tagging disabled (common) case.

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