mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 02:24:40 +02:00
6687581: Make CMS work with compressed oops
Make FreeChunk read markword instead of LSB in _klass pointer to indicate that it's a FreeChunk for compressed oops. Reviewed-by: ysr, jmasa
This commit is contained in:
parent
4cce21039e
commit
a2d6036a4d
13 changed files with 315 additions and 160 deletions
|
@ -47,15 +47,15 @@ void FreeChunk::mangleAllocated(size_t size) {
|
|||
Copy::fill_to_words(addr + hdr, size - hdr, baadbabeHeapWord);
|
||||
}
|
||||
|
||||
void FreeChunk::mangleFreed(size_t size) {
|
||||
void FreeChunk::mangleFreed(size_t sz) {
|
||||
assert(baadbabeHeapWord != deadbeefHeapWord, "Need distinct patterns");
|
||||
// mangle all but the header of a just-freed block of storage
|
||||
// just prior to passing it to the storage dictionary
|
||||
assert(size >= MinChunkSize, "smallest size of object");
|
||||
assert(size == _size, "just checking");
|
||||
assert(sz >= MinChunkSize, "smallest size of object");
|
||||
assert(sz == size(), "just checking");
|
||||
HeapWord* addr = (HeapWord*)this;
|
||||
size_t hdr = header_size();
|
||||
Copy::fill_to_words(addr + hdr, size - hdr, deadbeefHeapWord);
|
||||
Copy::fill_to_words(addr + hdr, sz - hdr, deadbeefHeapWord);
|
||||
}
|
||||
|
||||
void FreeChunk::verifyList() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue