use the new memory pool API
exit non-zero on a valgrind error