perf: don't rely on glibc malloc working for sz 0

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>