< prev index next >
src/share/vm/classfile/symbolTable.cpp
Print this page
*** 537,547 ****
}
}
bool SymbolTable::copy_compact_table(char** top, char*end) {
#if INCLUDE_CDS
! CompactHashtableWriter ch_table("symbol", the_table()->number_of_entries(),
&MetaspaceShared::stats()->symbol);
if (*top + ch_table.get_required_bytes() > end) {
// not enough space left
return false;
}
--- 537,548 ----
}
}
bool SymbolTable::copy_compact_table(char** top, char*end) {
#if INCLUDE_CDS
! CompactHashtableWriter ch_table(CompactHashtable<Symbol*, char>::_symbol_table,
! the_table()->number_of_entries(),
&MetaspaceShared::stats()->symbol);
if (*top + ch_table.get_required_bytes() > end) {
// not enough space left
return false;
}
*** 554,573 ****
assert(fixed_hash == p->hash(), "must not rehash during dumping");
ch_table.add(fixed_hash, s);
}
}
- char* old_top = *top;
ch_table.dump(top, end);
*top = (char*)align_pointer_up(*top, sizeof(void*));
#endif
return true;
}
const char* SymbolTable::init_shared_table(const char* buffer) {
! const char* end = _shared_table.init(buffer);
return (const char*)align_pointer_up(end, sizeof(void*));
}
//---------------------------------------------------------------------------
// Non-product code
--- 555,574 ----
assert(fixed_hash == p->hash(), "must not rehash during dumping");
ch_table.add(fixed_hash, s);
}
}
ch_table.dump(top, end);
*top = (char*)align_pointer_up(*top, sizeof(void*));
#endif
return true;
}
const char* SymbolTable::init_shared_table(const char* buffer) {
! const char* end = _shared_table.init(
! CompactHashtable<Symbol*, char>::_symbol_table, buffer);
return (const char*)align_pointer_up(end, sizeof(void*));
}
//---------------------------------------------------------------------------
// Non-product code
< prev index next >