Mercurial > hg > truffle
diff src/share/vm/memory/threadLocalAllocBuffer.cpp @ 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 | 52b4284cb496 |
children | 8f2fb6bec986 |
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 }