src/share/vm/memory/metachunk.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/memory/metachunk.cpp	Fri Mar 11 01:25:33 2016
--- new/src/share/vm/memory/metachunk.cpp	Fri Mar 11 01:25:33 2016

*** 28,39 **** --- 28,37 ---- #include "utilities/copy.hpp" #include "utilities/debug.hpp" class VirtualSpaceNode; const size_t metadata_chunk_initialize = 0xf7f7f7f7; size_t Metachunk::object_alignment() { // Must align pointers and sizes to 8, // so that 64 bit types get correctly aligned. const size_t alignment = 8;
*** 56,71 **** --- 54,64 ---- _container(container) { _top = initial_top(); #ifdef ASSERT set_is_tagged_free(false); size_t data_word_size = pointer_delta(end(), _top, sizeof(MetaWord)); Copy::fill_to_words((HeapWord*)_top, data_word_size, metadata_chunk_initialize); + mangle(); #endif } MetaWord* Metachunk::allocate(size_t word_size) { MetaWord* result = NULL;
*** 96,111 **** --- 89,104 ---- used_word_size(), free_word_size()); } } #ifndef PRODUCT ! void Metachunk::mangle(juint wordValue) { ! // Mangle the payload of the chunk and not the links that ! // Overwrite the payload of the chunk and not the links that // maintain list of chunks. ! HeapWord* start = (HeapWord*)(bottom() + overhead()); ! HeapWord* start = (HeapWord*)initial_top(); size_t size = word_size() - overhead(); ! Copy::fill_to_words(start, size, metadata_chunk_initialize); ! Copy::fill_to_words(start, size, wordValue); } #endif // PRODUCT void Metachunk::verify() { #ifdef ASSERT

src/share/vm/memory/metachunk.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File