aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorWangyang Guo <wangyang.guo@intel.com>2024-12-04 19:16:22 +0800
committerH.J. Lu <hjl.tools@gmail.com>2024-12-11 11:34:47 +0800
commit226e3b0a413673c0d6691a0ae6dd001fe05d21cd (patch)
tree8319c36419d925c17d4e5ddb83cc310a8c67a175 /sysdeps
parentf962932206eca2cfed0a26e72220ad3465bf9e65 (diff)
downloadglibc-226e3b0a413673c0d6691a0ae6dd001fe05d21cd.zip
glibc-226e3b0a413673c0d6691a0ae6dd001fe05d21cd.tar.gz
glibc-226e3b0a413673c0d6691a0ae6dd001fe05d21cd.tar.bz2
malloc: Add tcache path for calloc
This commit add tcache support in calloc() which can largely improve the performance of small size allocation, especially in multi-thread scenario. tcache_available() and tcache_try_malloc() are split out as a helper function for better reusing the code. Also fix tst-safe-linking failure after enabling tcache. In previous, calloc() is used as a way to by-pass tcache in memory allocation and trigger safe-linking check in fastbins path. With tcache enabled, it needs extra workarounds to bypass tcache. Result of bench-calloc-thread benchmark Test Platform: Xeon-8380 Ratio: New / Original time_per_iteration (Lower is Better) Threads# | Ratio -----------|------ 1 thread | 0.656 4 threads | 0.470 Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'sysdeps')
0 files changed, 0 insertions, 0 deletions