perf bench: Fix memory allocation fail check in mem{set,cpy} workloads