hotspot/src/share/vm/gc/shared/spaceDecorator.cpp
changeset 35061 be6025ebffea
parent 30764 fec48bf5a827
child 37145 2758de6e8b3c
equal deleted inserted replaced
35060:382d0689141c 35061:be6025ebffea
    23  */
    23  */
    24 
    24 
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
    26 #include "gc/shared/space.inline.hpp"
    26 #include "gc/shared/space.inline.hpp"
    27 #include "gc/shared/spaceDecorator.hpp"
    27 #include "gc/shared/spaceDecorator.hpp"
       
    28 #include "logging/log.hpp"
    28 #include "utilities/copy.hpp"
    29 #include "utilities/copy.hpp"
    29 
    30 
    30 // Catch-all file for utility classes
    31 // Catch-all file for utility classes
    31 
    32 
    32 #ifndef PRODUCT
    33 #ifndef PRODUCT
    81 
    82 
    82 // Simply mangle the MemRegion mr.
    83 // Simply mangle the MemRegion mr.
    83 void SpaceMangler::mangle_region(MemRegion mr) {
    84 void SpaceMangler::mangle_region(MemRegion mr) {
    84   assert(ZapUnusedHeapArea, "Mangling should not be in use");
    85   assert(ZapUnusedHeapArea, "Mangling should not be in use");
    85 #ifdef ASSERT
    86 #ifdef ASSERT
    86   if(TraceZapUnusedHeapArea) {
    87   log_develop_trace(gc)("Mangling [" PTR_FORMAT " to " PTR_FORMAT ")", p2i(mr.start()), p2i(mr.end()));
    87     gclog_or_tty->print("Mangling [" PTR_FORMAT " to " PTR_FORMAT ")", p2i(mr.start()), p2i(mr.end()));
       
    88   }
       
    89   Copy::fill_to_words(mr.start(), mr.word_size(), badHeapWord);
    88   Copy::fill_to_words(mr.start(), mr.word_size(), badHeapWord);
    90   if(TraceZapUnusedHeapArea) {
    89   log_develop_trace(gc)("Mangling done.");
    91     gclog_or_tty->print_cr(" done");
       
    92   }
       
    93 #endif
    90 #endif
    94 }
    91 }
    95 
    92 
    96 // Check that top, top_for_allocations and the last
    93 // Check that top, top_for_allocations and the last
    97 // word of the space are mangled.  In a tight memory
    94 // word of the space are mangled.  In a tight memory