--- old/src/hotspot/share/gc/g1/g1Allocator.hpp 2020-01-08 10:47:56.820176122 +0100 +++ new/src/hotspot/share/gc/g1/g1Allocator.hpp 2020-01-08 10:47:56.644173636 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -203,12 +203,17 @@ void undo_allocation(G1HeapRegionAttr dest, HeapWord* obj, size_t word_sz, uint node_index); }; -// G1ArchiveRegionMap is a boolean array used to mark G1 regions as +// G1ArchiveRegionMap is an array used to mark G1 regions as // archive regions. This allows a quick check for whether an object // should not be marked because it is in an archive region. -class G1ArchiveRegionMap : public G1BiasedMappedArray { +class G1ArchiveRegionMap : public G1BiasedMappedArray { +public: + static const uint8_t NoArchive = 0; + static const uint8_t OpenArchive = 1; + static const uint8_t ClosedArchive = 2; + protected: - bool default_value() const { return false; } + uint8_t default_value() const { return NoArchive; } }; // G1ArchiveAllocator is used to allocate memory in archive @@ -301,7 +306,7 @@ private: static bool _archive_check_enabled; - static G1ArchiveRegionMap _closed_archive_region_map; + static G1ArchiveRegionMap _archive_region_map; static G1ArchiveRegionMap _open_archive_region_map; // Check if an object is in a closed archive region using the _closed_archive_region_map.