What | Removed | Added |
---|---|---|
Flags | needinfo?(schwab@suse.com) |
(In reply to Andreas Schwab from comment #1) > MALLOC_PERTURB_ will always touch every newly allocated and every freed > memory. That's the whole point of it. Yes, but I'm wondering whether it goes even further than that: > FWICT, the bottleneck is that add_new_trans calls realloc very often, and glibc treats that like a new allocation + deallocation to be able to overwrite the old data. Maybe that can be optimized somehow? i.e. does glibc effectively transform realloc into malloc + free or does it realloc like before but just memset the additional space? Because according to the perf report, pretty much all of the realloc cost is spent in _int_free, while I'd expect that a noticable percentage of realloc calls could be expanded in-place.