lib/memalign: don't malloc size twice
authorTomohiro Kusumi <tkusumi@tuxera.com>
Mon, 18 Sep 2017 17:53:49 +0000 (20:53 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Sep 2017 18:04:36 +0000 (12:04 -0600)
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 <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

No differences found