equal
deleted
inserted
replaced
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()) { |