8244489: Zero and minimal VM build failure after JDK-8241071 (MetaspaceShared::symbol_space_alloc is undefined)

Reviewed-by: dholmes
This commit is contained in:
Jie Fu 2020-05-06 09:00:30 +08:00
parent 0c0d485c37
commit 317bd88e33

View file

@ -57,6 +57,7 @@ Symbol::Symbol(const u1* name, int length, int refcount) {
}
void* Symbol::operator new(size_t sz, int len) throw() {
#if INCLUDE_CDS
if (DumpSharedSpaces) {
// To get deterministic output from -Xshare:dump, we ensure that Symbols are allocated in
// increasing addresses. When the symbols are copied into the archive, we preserve their
@ -71,6 +72,7 @@ void* Symbol::operator new(size_t sz, int len) throw() {
DEBUG_ONLY(last = p);
return p;
}
#endif
int alloc_size = size(len)*wordSize;
address res = (address) AllocateHeap(alloc_size, mtSymbol);
return res;