src/hotspot/share/gc/shared/spaceDecorator.cpp
changeset 53792 6fb43030a1b4
parent 47216 71c04702a3d5
child 58980 47c20fc6a517
equal deleted inserted replaced
53791:bec6c8739833 53792:6fb43030a1b4
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    34 
    34 
    35 // Returns true is the location q matches the mangling
    35 // Returns true is the location q matches the mangling
    36 // pattern.
    36 // pattern.
    37 bool SpaceMangler::is_mangled(HeapWord* q) {
    37 bool SpaceMangler::is_mangled(HeapWord* q) {
    38   // This test loses precision but is good enough
    38   // This test loses precision but is good enough
    39   return badHeapWord == (max_juint & (uintptr_t) q->value());
    39   return badHeapWord == (max_juint & reinterpret_cast<uintptr_t>(*q));
    40 }
    40 }
    41 
    41 
    42 
    42 
    43 void SpaceMangler::set_top_for_allocations(HeapWord* v)  {
    43 void SpaceMangler::set_top_for_allocations(HeapWord* v)  {
    44   if (v < end()) {
    44   if (v < end()) {