--- old/src/share/vm/services/mallocTracker.hpp 2015-02-09 11:39:11.474842000 -0500 +++ new/src/share/vm/services/mallocTracker.hpp 2015-02-09 11:39:11.062921000 -0500 @@ -164,6 +164,10 @@ } void copy_to(MallocMemorySnapshot* s) { + // Need to make sure that mtChunks don't get deallocated while the + // copy is going on, because their size is adjusted using this + // buffer in make_adjustment(). + ThreadCritical tc; s->_tracking_header = _tracking_header; for (int index = 0; index < mt_number_of_types; index ++) { s->_malloc[index] = _malloc[index];