mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-16 09:56:22 +03:00
Pairing heap: inline functions instead of macros.
By force-inlining everything that would otherwise be a macro, we get the same effect (it's not clear in the first place that this is actually a good idea, but it avoids making any changes to the existing performance profile). This makes the code more maintainable (in anticipation of subsequent changes), as well as making performance profiles and debug info more readable (we get "real" line numbers, instead of making everything point to the macro definition of all associated functions).
This commit is contained in:
parent
92a1e38f52
commit
08a4cc0969
6 changed files with 450 additions and 377 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#include "jemalloc/internal/jemalloc_preamble.h"
|
||||
#include "jemalloc/internal/jemalloc_internal_includes.h"
|
||||
|
||||
ph_gen(, edata_avail_, edata_avail_t, edata_t, ph_link,
|
||||
ph_gen(, edata_avail, edata_t, avail_link,
|
||||
edata_esnead_comp)
|
||||
ph_gen(, edata_heap_, edata_heap_t, edata_t, ph_link, edata_snad_comp)
|
||||
ph_gen(, edata_heap, edata_t, heap_link, edata_snad_comp)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ hpdata_age_comp(const hpdata_t *a, const hpdata_t *b) {
|
|||
return (a_age > b_age) - (a_age < b_age);
|
||||
}
|
||||
|
||||
ph_gen(, hpdata_age_heap_, hpdata_age_heap_t, hpdata_t, ph_link, hpdata_age_comp)
|
||||
ph_gen(, hpdata_age_heap, hpdata_t, age_link, hpdata_age_comp)
|
||||
|
||||
void
|
||||
hpdata_init(hpdata_t *hpdata, void *addr, uint64_t age) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue