< prev index next >

src/share/vm/memory/metaspace.cpp

Print this page
rev 7602 : 8064457: Introduce compressed oops mode disjoint base and improve compressed heap handling.

*** 420,430 **** // memory addresses don't conflict. if (DumpSharedSpaces) { bool large_pages = false; // No large pages when dumping the CDS archive. char* shared_base = (char*)align_ptr_up((char*)SharedBaseAddress, Metaspace::reserve_alignment()); ! _rs = ReservedSpace(bytes, Metaspace::reserve_alignment(), large_pages, shared_base, 0); if (_rs.is_reserved()) { assert(shared_base == 0 || _rs.base() == shared_base, "should match"); } else { // Get a mmap region anywhere if the SharedBaseAddress fails. _rs = ReservedSpace(bytes, Metaspace::reserve_alignment(), large_pages); --- 420,430 ---- // memory addresses don't conflict. if (DumpSharedSpaces) { bool large_pages = false; // No large pages when dumping the CDS archive. char* shared_base = (char*)align_ptr_up((char*)SharedBaseAddress, Metaspace::reserve_alignment()); ! _rs = ReservedSpace(bytes, Metaspace::reserve_alignment(), large_pages, shared_base); if (_rs.is_reserved()) { assert(shared_base == 0 || _rs.base() == shared_base, "should match"); } else { // Get a mmap region anywhere if the SharedBaseAddress fails. _rs = ReservedSpace(bytes, Metaspace::reserve_alignment(), large_pages);
*** 3023,3033 **** bool large_pages = false; ReservedSpace metaspace_rs = ReservedSpace(compressed_class_space_size(), _reserve_alignment, large_pages, ! requested_addr, 0); if (!metaspace_rs.is_reserved()) { #if INCLUDE_CDS if (UseSharedSpaces) { size_t increment = align_size_up(1*G, _reserve_alignment); --- 3023,3033 ---- bool large_pages = false; ReservedSpace metaspace_rs = ReservedSpace(compressed_class_space_size(), _reserve_alignment, large_pages, ! requested_addr); if (!metaspace_rs.is_reserved()) { #if INCLUDE_CDS if (UseSharedSpaces) { size_t increment = align_size_up(1*G, _reserve_alignment);
*** 3037,3047 **** char *addr = requested_addr; while (!metaspace_rs.is_reserved() && (addr + increment > addr) && can_use_cds_with_metaspace_addr(addr + increment, cds_base)) { addr = addr + increment; metaspace_rs = ReservedSpace(compressed_class_space_size(), ! _reserve_alignment, large_pages, addr, 0); } } #endif // If no successful allocation then try to allocate the space anywhere. If // that fails then OOM doom. At this point we cannot try allocating the --- 3037,3047 ---- char *addr = requested_addr; while (!metaspace_rs.is_reserved() && (addr + increment > addr) && can_use_cds_with_metaspace_addr(addr + increment, cds_base)) { addr = addr + increment; metaspace_rs = ReservedSpace(compressed_class_space_size(), ! _reserve_alignment, large_pages, addr); } } #endif // If no successful allocation then try to allocate the space anywhere. If // that fails then OOM doom. At this point we cannot try allocating the
< prev index next >