From: Tomohiro Kusumi Date: Mon, 18 Sep 2017 17:53:49 +0000 (+0300) Subject: lib/memalign: don't malloc size twice X-Git-Tag: fio-3.1~6 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=ba8b89a1549c5ce7d7544813c9137798de454fac;hp=ba8b89a1549c5ce7d7544813c9137798de454fac;p=fio.git lib/memalign: don't malloc size twice The footer offset (diff between malloc'd address and aligned address) is (alignment-1) at most, and footer appears `size' bytes after the aligned address, thus required size is (alignment-1 + size + sizeof(*f)). The existing code seems to allocate extra unused `size' bytes. Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe ---