pluggable allocation tracking, verified no leaks in tests