[Bug libstdc++/64128] Let vector take advantage of malloc_usable_size for malloc-using allocators

gcc-bugzilla at contacts dot eelis.net gcc-bugzilla@gcc.gnu.org
Mon Dec 1 17:14:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64128

--- Comment #4 from Eelis <gcc-bugzilla at contacts dot eelis.net> ---
Yeah, I noticed that tcmalloc is also way faster, and since tcmalloc barely
over-allocates for the sizes requested by vector, there is no benefit to using
malloc_usable_size (which it also supports) there.

So I think the bottom line is indeed: just don't use glibc malloc, because it's
very slow.



More information about the Gcc-bugs mailing list