< prev index next >
src/hotspot/share/utilities/hashtable.cpp
Print this page
*** 30,40 ****
#include "classfile/packageEntry.hpp"
#include "classfile/placeholders.hpp"
#include "classfile/protectionDomainCache.hpp"
#include "classfile/stringTable.hpp"
#include "memory/allocation.inline.hpp"
! #include "memory/filemap.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/safepoint.hpp"
#include "utilities/dtrace.hpp"
#include "utilities/hashtable.hpp"
--- 30,40 ----
#include "classfile/packageEntry.hpp"
#include "classfile/placeholders.hpp"
#include "classfile/protectionDomainCache.hpp"
#include "classfile/stringTable.hpp"
#include "memory/allocation.inline.hpp"
! #include "memory/metaspaceShared.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/safepoint.hpp"
#include "utilities/dtrace.hpp"
#include "utilities/hashtable.hpp"
*** 159,170 ****
template <MEMFLAGS F> void BasicHashtable<F>::free_buckets() {
if (NULL != _buckets) {
// Don't delete the buckets in the shared space. They aren't
// allocated by os::malloc
! if (!UseSharedSpaces ||
! !FileMapInfo::current_info()->is_in_shared_space(_buckets)) {
FREE_C_HEAP_ARRAY(HashtableBucket, _buckets);
}
_buckets = NULL;
}
}
--- 159,169 ----
template <MEMFLAGS F> void BasicHashtable<F>::free_buckets() {
if (NULL != _buckets) {
// Don't delete the buckets in the shared space. They aren't
// allocated by os::malloc
! if (!MetaspaceShared::is_in_shared_metaspace(_buckets)) {
FREE_C_HEAP_ARRAY(HashtableBucket, _buckets);
}
_buckets = NULL;
}
}
< prev index next >