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).
This commit is contained in:
mgrice
2019-03-08 11:50:30 -08:00
committed by Qi Wang
parent c2a3a7cd3f
commit d3d7a8ef09
4 changed files with 17 additions and 3 deletions

View File

@@ -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 */