/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "gc_implementation/concurrentMarkSweep/freeChunk.hpp"
#include "memory/allocation.hpp"
// Forward declarations
class CompactibleFreeListSpace;
private:
enum {
};
// Below, we want _narrow_next in the "higher" 32 bit slot,
// whose position will depend on endian-ness of the platform.
// This is so that there is no interference with the
// cms_free_bit occupying bit position 7 (lsb == 0)
// when we are using compressed oops; see FreeChunk::is_free().
// We cannot move the cms_free_bit down because currently
// biased locking code assumes that age bits are contiguous
// with the lock bits. Even if that assumption were relaxed,
// the least position we could move this bit to would be
// to bit position 3, which would require 16 byte alignment.
typedef struct {
#ifdef VM_LITTLE_ENDIAN
#else
#endif
} Data;
union {
};
public:
if (UseCompressedOops) {
// The next pointer is a compressed oop stored in the top 32 bits
} else {
}
return res;
}
"or insufficient alignment of objects");
if (UseCompressedOops) {
} else {
}
}
inline void setPromotedMark() {
_next |= promoted_mask;
}
inline bool hasPromotedMark() const {
}
inline void setDisplacedMark() {
_next |= displaced_mark;
}
inline bool hasDisplacedMark() const {
return (_next & displaced_mark) != 0;
}
inline void clear_next() {
_next = 0;
}
};
friend class PromotionInfo;
protected:
// Note about bufferSize: it denotes the number of entries available plus 1;
// legal indices range from 1 through BufferSize - 1. See the verification
// code verify() that counts the number of displaced headers spooled.
}
public:
void init() {
}
};
// first spooling block (_spoolHead)
// spooling block (_spoolTail)
private:
// ensure that spooling space exists; return true if there is spooling space
bool ensure_spooling_space_work();
public:
PromotionInfo() :
_nextIndex(1) {}
bool noPromotions() const {
return _promoHead == NULL;
}
void startTrackingPromotions();
// The following variant must be used when trackOop is not fully
// initialized and has a NULL klass:
// save header and forward spool
inline size_t refillSize() const;
inline bool has_spooling_space() {
}
// ensure that spooling space exists
bool ensure_spooling_space() {
return has_spooling_space() || ensure_spooling_space_work();
}
}
void verify() const;
void reset() {
_promoHead = NULL;
_promoTail = NULL;
_spoolHead = NULL;
_spoolTail = NULL;
_spareSpool = NULL;
_firstIndex = 0;
_nextIndex = 0;
}
};
#endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_PROMOTIONINFO_HPP