changeset 18697:ee26b8eb1601

Check for overzeroing in the TLAB
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Tue, 16 Dec 2014 13:28:33 -0800
parents b2859128b76a
children abd10b6ef99d
files src/share/vm/memory/threadLocalAllocBuffer.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/memory/threadLocalAllocBuffer.cpp	Tue Dec 16 10:20:43 2014 -0800
+++ b/src/share/vm/memory/threadLocalAllocBuffer.cpp	Tue Dec 16 13:28:33 2014 -0800
@@ -42,6 +42,9 @@
 
 void ThreadLocalAllocBuffer::clear_before_allocation() {
   _slow_refill_waste += (unsigned)remaining();
+  // In debug mode we expect the storage above top to be uninitialized
+  // or filled with a padding object.
+  assert(top() == NULL || *(intptr_t*)top() != 0, "overzeroing detected");
   make_parsable(true);   // also retire the TLAB
 }