Fields

hardware None
os None

Parameters

Fields

NameValue

Parameters

NameValue
git_commit commit cedb44af53f195135e8e8de98f161048d19f8857
Author: Louis Dionne <ldionne.2@gmail.com>
Date: Mon Jan 13 09:10:36 2025 -0500

[libc++] Pass type information down to __libcpp_allocate (#118837)

Currently, places where we call __libcpp_allocate must drop type
information on the ground even when they actually have such information
available. That is unfortunate since some toolchains and system
allocators are able to provide improved security when they know what
type is being allocated.

This is the purpose of http://wg21.link/p2719, where we introduce a new
variant of `operator new` which takes a type in its interface. A
different but related issue is that `std::allocator` does not honor any
in-class `T::operator new` since it is specified to call the global
`::operator new` instead.

This patch closes the gap to make it trivial for implementations that
provide typed memory allocators to actually benefit from that
information in more contexts, and also makes libc++ forward-compatible
with future proposals that would fix the existing defects in
`std::allocator`. It also makes the internal allocation API higher level
by operating on objects instead of operating on bytes of memory.

Since this is a widely-used function and making this a template could
have an impact on debug info sizes, I tried minimizing the number of
templated layers by removing `__do_deallocate_handle_size`, which was
easy to replace with a macro (and IMO this leads to cleaner code).
Filter

ldionne-old-macbook-results test results

Run Order Start Time Duration
Current 523623 2025-12-16T16:40:01 0:00:00
Previous 523622 2025-12-16T16:40:01 0:00:00
Baseline 485288 2025-12-16T16:40:01 0:00:00


Tests Summary

Status Group # # (B)
Performance Improvements 2 0
Added Tests 0 18
Unchanged Tests 88 72
Total Tests 90

Performance Improvements - execution_time Δ Previous Current σ Δ (B) σ (B)
734_vpr_r -3.11% 15.779 15.287 - 0.00% -
767_nest_r -1.43% 14.302 14.099 - 0.00% -

Added Tests - execution_time
706_stockfish_r
707_ntest_r
709_cactus_r
710_omnetpp_r
721_gcc_r
723_llvm_r
727_cppcheck_r
729_abc_r
731_astcenc_r
734_vpr_r
735_gem5_r
736_ocio_r
737_gmsh_r
748_flightdm_r
750_sealcrypto_r
753_ns3_r
766_femflow_r
767_nest_r


Report Time: 0.06s