[PATCH] Add reallocarray function.
Florian Weimer
fweimer@redhat.com
Wed Apr 12 16:35:00 GMT 2017
On 04/12/2017 05:24 PM, Dennis Wölfing wrote:
> The static inline function check_mul_overflow is used in both
> reallocarray and calloc. So that function would need to be in a file
> that can be included by both malloc.c and a new reallocarray.c file.
>
> Would malloc-internal.h be a good location to put that inline function
> or should I place it into its own separate file?
Use malloc-internal.h or create a new malloc-private.h header.
malloc-internal.h is used for things which are used in other glibc
modules (fork handler and ld.so), but we aren't fully consistent yet
about the distinction in other areas of the library.
Thanks,
Florian
More information about the Libc-alpha
mailing list