tsan: implement malloc stats querying