Path: blob/master/src/hotspot/share/gc/z/zAddress.hpp
40957 views
/*1* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223#ifndef SHARE_GC_Z_ZADDRESS_HPP24#define SHARE_GC_Z_ZADDRESS_HPP2526#include "memory/allocation.hpp"2728class ZAddress : public AllStatic {29friend class ZAddressTest;3031private:32static void set_good_mask(uintptr_t mask);3334public:35static void initialize();3637static void flip_to_marked();38static void flip_to_remapped();3940static bool is_null(uintptr_t value);41static bool is_bad(uintptr_t value);42static bool is_good(uintptr_t value);43static bool is_good_or_null(uintptr_t value);44static bool is_weak_bad(uintptr_t value);45static bool is_weak_good(uintptr_t value);46static bool is_weak_good_or_null(uintptr_t value);47static bool is_marked(uintptr_t value);48static bool is_marked_or_null(uintptr_t value);49static bool is_finalizable(uintptr_t value);50static bool is_finalizable_good(uintptr_t value);51static bool is_remapped(uintptr_t value);52static bool is_in(uintptr_t value);5354static uintptr_t offset(uintptr_t value);55static uintptr_t good(uintptr_t value);56static uintptr_t good_or_null(uintptr_t value);57static uintptr_t finalizable_good(uintptr_t value);58static uintptr_t marked(uintptr_t value);59static uintptr_t marked0(uintptr_t value);60static uintptr_t marked1(uintptr_t value);61static uintptr_t remapped(uintptr_t value);62static uintptr_t remapped_or_null(uintptr_t value);63};6465#endif // SHARE_GC_Z_ZADDRESS_HPP666768