summaryrefslogtreecommitdiffstats
path: root/include/jemalloc
diff options
context:
space:
mode:
authormgrice <mgrice@fb.com>2019-03-08 19:50:30 (GMT)
committerQi Wang <interwq@gmail.com>2019-04-08 17:59:05 (GMT)
commitd3d7a8ef09b6fa79109e8930aaba7a677f8b24ac (patch)
tree33aeb53a9e962c9092a7f9d1b8365ca26e5ebfad /include/jemalloc
parentc2a3a7cd3f3cbc177d677101be85a31a39c26bd0 (diff)
downloadjemalloc-d3d7a8ef09b6fa79109e8930aaba7a677f8b24ac.zip
jemalloc-d3d7a8ef09b6fa79109e8930aaba7a677f8b24ac.tar.gz
jemalloc-d3d7a8ef09b6fa79109e8930aaba7a677f8b24ac.tar.bz2
remove compare and branch in fast path for c++ operator delete[]
Summary: sdallocx is checking a flag that will never be set (at least in the provided C++ destructor implementation). This branch will probably only rarely be mispredicted however it removes two instructions in sdallocx and one at the callsite (to zero out flags).
Diffstat (limited to 'include/jemalloc')
-rw-r--r--include/jemalloc/internal/jemalloc_internal_externs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal_externs.h b/include/jemalloc/internal/jemalloc_internal_externs.h
index b784362..cdbc33a 100644
--- a/include/jemalloc/internal/jemalloc_internal_externs.h
+++ b/include/jemalloc/internal/jemalloc_internal_externs.h
@@ -51,5 +51,6 @@ void jemalloc_prefork(void);
void jemalloc_postfork_parent(void);
void jemalloc_postfork_child(void);
bool malloc_initialized(void);
+void je_sdallocx_noflags(void *ptr, size_t size);
#endif /* JEMALLOC_INTERNAL_EXTERNS_H */