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 02/25/2013 05:16 PM, Niels Möller wrote:
Essentially, I'd like try_realloc to succeed whenever it can succeed
with less work than free + malloc. With the current implementation, that
is when the current block can be grown in place, and when it can be
grown via remap.

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.


--
Florian Weimer / Red Hat Product Security Team


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