alloc-util: use malloc_usable_size() to determine allocated size
authorLennart Poettering <lennart@poettering.net>
Wed, 20 Mar 2019 09:31:38 +0000 (10:31 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Mar 2019 09:48:33 +0000 (10:48 +0100)
commitd4b604baeadbb2498e4f2c3e260260eed210f5d6
tree65f19bca6856ee4f96320eda5e4e473baa803406
parent23964f7faf86df7fd297dc5b0a9f1dfb03a0eb56
alloc-util: use malloc_usable_size() to determine allocated size

It's a glibc-specific API, but supported on FreeBSD and musl too at
least, hence fairly common. This way we can reduce our calls to
realloc() as much as possible.
src/basic/alloc-util.c