The following range check limits the total shared space to be less than MAX_SHARED_DELTA unnecessarily. The shared symbols are allocated from the RO space at dump time. The max_delta can be calculated from the 'base_address - end_of_RO_space'.
juint* CompactHashtableWriter::dump_buckets() {
uintx base_address = 0;
uintx max_delta = 0;
int num_compact_buckets = 0;
if (_type == CompactHashtable<Symbol*, char>::_symbol_table) {
base_address = uintx(MetaspaceShared::shared_rs()->base());
max_delta = uintx(MetaspaceShared::shared_rs()->size());
assert(max_delta <= MAX_SHARED_DELTA, "range check");
Also, it might even be better to just use the start address of RO space as the 'base_address'.