Don't malloc ioengine_ops for cpp_null
authorTomohiro Kusumi <tkusumi@tuxera.com>
Thu, 5 Jan 2017 17:32:17 +0000 (02:32 +0900)
committerJens Axboe <axboe@fb.com>
Thu, 5 Jan 2017 17:35:46 +0000 (10:35 -0700)
commit247f299a0edcc493b9c506c51130d20ebb0f68ac
treedc4745d48a3e45519658d158b74f8941b54a7caf
parent465920381b80d2a6ee472f498e7d7444a310160b
Don't malloc ioengine_ops for cpp_null

fio assumes opses aren't dynamically allocated which means malloc'd
engine here never gets freed.

According to 46a67478 and a8075704, the point of get_ioengine() is
how non-static ops gets initialized by g++, but not how space for ops
gets allocated, thus it should just define a static global variable
within "C" scope and pass the address of ops to a caller via **.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
engines/null.c