This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Suggestion: try_realloc


On Tue, Feb 26, 2013 at 7:41 AM, Florian Weimer <fweimer@redhat.com> wrote:

> For std::vector, it would be beneficial to have an interface which succeeds
> only if the address doesn't change.  I think this would fit your needs as
> well.

jemalloc implements this (and more), and fbvector uses it with
significant speedups observed:
https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md

I suggest reading http://linux.die.net/man/3/jemalloc man page for inspiration.


-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]