From 4dd8e7c0ce5ecc7f65e33e60ad2f717b31de32ec Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 21 Jun 2017 22:43:57 +0200 Subject: Implement allocation buffers for internal use This commit adds fixed-size allocation buffers. The primary use case is in NSS modules, where dynamically sized data is stored in a fixed-size buffer provided by the caller. Other uses include a replacement of mempcpy cascades (which is safer due to the size checking inherent to allocation buffers). --- malloc/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'malloc/Makefile') diff --git a/malloc/Makefile b/malloc/Makefile index 14c13f1..b50de7c 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -33,6 +33,7 @@ tests := mallocbug tst-malloc tst-valloc tst-calloc tst-obstack \ tst-mallocfork2 \ tst-interpose-nothread \ tst-interpose-thread \ + tst-alloc_buffer \ tests-static := \ tst-interpose-static-nothread \ @@ -63,6 +64,11 @@ routines = malloc morecore mcheck mtrace obstack reallocarray \ dynarray_finalize \ dynarray_resize \ dynarray_resize_clear \ + alloc_buffer_alloc_array \ + alloc_buffer_allocate \ + alloc_buffer_copy_bytes \ + alloc_buffer_copy_string \ + alloc_buffer_create_failure \ install-lib := libmcheck.a non-lib.a := libmcheck.a -- cgit v1.1