Add internal facility for dynamic array handling

System Internals / glibc - Florian Weimer [redhat.com] - 2 June 2017 05:59 EDT

This is intended as a type-safe alternative to obstacks and hand-written realloc constructs. The implementation avoids writing function pointers to the heap.

91b6eb1 Add internal facility for dynamic array handling
ChangeLog | 37 +++
malloc/Makefile | 27 +-
malloc/Versions | 8 +
malloc/dynarray-skeleton.c | 499 +++++++++++++++++++++++++++++
malloc/dynarray.h | 176 +++++++++++
malloc/dynarray_at_failure.c | 31 ++
malloc/dynarray_emplace_enlarge.c | 69 +++++
malloc/dynarray_finalize.c | 62 ++++
malloc/dynarray_resize.c | 59 ++++
malloc/dynarray_resize_clear.c | 35 +++
malloc/tst-dynarray-at-fail.c | 125 ++++++++
malloc/tst-dynarray-fail.c | 418 +++++++++++++++++++++++++
malloc/tst-dynarray-shared.h | 77 +++++
malloc/tst-dynarray.c | 517 +++++++++++++++++++++++++++++++
support/Makefile | 4 +
support/capture_subprocess.h | 42 +++
support/support_capture_subprocess.c | 108 +++++++
support/tst-support_capture_subprocess.c | 188 +++++++++++
support/xdup2.c | 28 ++
support/xpipe.c | 28 ++
support/xunistd.h | 2 +
21 files changed, 2538 insertions(+), 2 deletions(-)

Upstream: sourceware.org


  • Share