[PATCH] Dynamic growable arrays for internal use
Florian Weimer
fweimer@redhat.com
Sat Apr 22 15:46:00 GMT 2017
The dynamic arrays implemented by the attached patch are intended as a
simplified, type-safe replacement for obstacks, and can be used to
replace custom array management with an on-stack initial buffer and an
exponential resizing policy using realloc.
Test coverage should be reasonable complete, including allocation error
testing. For the __libc_fatal testing, I had to add some support machinery.
The __check_mul_overflow_size_t function should go into the
<malloc-private.h> header once it exists (probably without the two
leading underscore).
Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dynarray.patch
Type: text/x-patch
Size: 83864 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170422/8471428f/attachment.bin>
More information about the Libc-alpha
mailing list