< prev index next >

src/hotspot/share/gc/shared/spaceDecorator.cpp

Print this page
rev 56811 : [mq]: 8189737-heapregion-remove-space-inheritance


   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"

  26 #include "gc/shared/space.inline.hpp"
  27 #include "gc/shared/spaceDecorator.hpp"
  28 #include "logging/log.hpp"
  29 #include "utilities/copy.hpp"
  30 
  31 // Catch-all file for utility classes
  32 
  33 #ifndef PRODUCT
  34 
  35 // Returns true is the location q matches the mangling
  36 // pattern.
  37 bool SpaceMangler::is_mangled(HeapWord* q) {
  38   // This test loses precision but is good enough
  39   return badHeapWord == (max_juint & reinterpret_cast<uintptr_t>(*q));
  40 }
  41 
  42 
  43 void SpaceMangler::set_top_for_allocations(HeapWord* v)  {
  44   if (v < end()) {
  45     assert(!CheckZapUnusedHeapArea || is_mangled(v),
  46       "The high water mark is not mangled");
  47   }




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc/parallel/mutableSpace.hpp"
  27 #include "gc/shared/space.inline.hpp"
  28 #include "gc/shared/spaceDecorator.inline.hpp"
  29 #include "logging/log.hpp"
  30 #include "utilities/copy.hpp"
  31 
  32 // Catch-all file for utility classes
  33 
  34 #ifndef PRODUCT
  35 
  36 // Returns true is the location q matches the mangling
  37 // pattern.
  38 bool SpaceMangler::is_mangled(HeapWord* q) {
  39   // This test loses precision but is good enough
  40   return badHeapWord == (max_juint & reinterpret_cast<uintptr_t>(*q));
  41 }
  42 
  43 
  44 void SpaceMangler::set_top_for_allocations(HeapWord* v)  {
  45   if (v < end()) {
  46     assert(!CheckZapUnusedHeapArea || is_mangled(v),
  47       "The high water mark is not mangled");
  48   }


< prev index next >