src/share/vm/runtime/virtualspace.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/runtime/virtualspace.cpp	Fri Dec 14 09:31:02 2012
--- new/src/share/vm/runtime/virtualspace.cpp	Fri Dec 14 09:31:02 2012

*** 327,350 **** --- 327,339 ---- // Check alignment constraints if ((((size_t)base + noaccess_prefix) & (alignment - 1)) != 0) { // Base not aligned, retry if (!os::release_memory(base, size)) fatal("os::release_memory failed"); // Reserve size large enough to do manual alignment and // increase size to a multiple of the desired alignment + // Make sure that size is aligned size = align_size_up(size, alignment); ! size_t extra_size = size + alignment; do { char* extra_base = os::reserve_memory(extra_size, NULL, alignment); if (extra_base == NULL) return; // Do manual alignement base = (char*) align_size_up((uintptr_t) extra_base, alignment); assert(base >= extra_base, "just checking"); // Re-reserve the region at the aligned base address. os::release_memory(extra_base, extra_size); base = os::reserve_memory(size, base); } while (base == NULL); ! base = os::reserve_memory_aligned(size, alignment); if (requested_address != 0 && failed_to_reserve_as_requested(base, requested_address, size, false)) { // As a result of the alignment constraints, the allocated base differs // from the requested address. Return back to the caller who can

src/share/vm/runtime/virtualspace.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File