lib/memalign: remove smalloc()/sfree() dependency
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 5 Jan 2020 15:01:10 +0000 (00:01 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 5 Jan 2020 15:01:19 +0000 (00:01 +0900)
commitfd745bf3cacdd51b58619ae48bfeb0358ddda28e
tree862b90d3e1240c219405f18f058c9e8f19ab9563
parentfa6e7f4fb827adb124dbb97a7f72d64e76b2fe6a
lib/memalign: remove smalloc()/sfree() dependency

fio_memalign()/fio_memfree() implementation shouldn't depend on
smalloc()/sfree() which has dependency on fio code itself.
e.g. This forces unittest code to prepare stab functions for
smalloc()/sfree().

This smalloc()/sfree() dependency was added by 3114b675fd
("fio: enable cross-thread overlap checking with processes").

Rename fio_memalign()/fio_memfree() to __fio_memalign()/__fio_memfree()
and take a function pointer instead of a boolean flag.
Add fio_memalign()/fio_memfree() as an inlined wrapper for
__fio_memalign()/__fio_memfree() without API change.
The only real change here is lib/memalign functions got renamed.

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
fio.h
lib/memalign.c
lib/memalign.h
t/dedupe.c
unittests/lib/memalign.c
unittests/unittest.c
unittests/unittest.h