equal
deleted
inserted
replaced
279 FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, profiled_size); |
279 FLAG_SET_ERGO(uintx, ProfiledCodeHeapSize, profiled_size); |
280 FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, non_profiled_size); |
280 FLAG_SET_ERGO(uintx, NonProfiledCodeHeapSize, non_profiled_size); |
281 |
281 |
282 // Align CodeHeaps |
282 // Align CodeHeaps |
283 size_t alignment = heap_alignment(); |
283 size_t alignment = heap_alignment(); |
284 non_nmethod_size = align_size_up(non_nmethod_size, alignment); |
284 non_nmethod_size = align_up(non_nmethod_size, alignment); |
285 profiled_size = align_size_down(profiled_size, alignment); |
285 profiled_size = align_down(profiled_size, alignment); |
286 |
286 |
287 // Reserve one continuous chunk of memory for CodeHeaps and split it into |
287 // Reserve one continuous chunk of memory for CodeHeaps and split it into |
288 // parts for the individual heaps. The memory layout looks like this: |
288 // parts for the individual heaps. The memory layout looks like this: |
289 // ---------- high ----------- |
289 // ---------- high ----------- |
290 // Non-profiled nmethods |
290 // Non-profiled nmethods |
320 MIN2(os::page_size_for_region_aligned(InitialCodeCacheSize, 8), |
320 MIN2(os::page_size_for_region_aligned(InitialCodeCacheSize, 8), |
321 os::page_size_for_region_aligned(size, 8)) : |
321 os::page_size_for_region_aligned(size, 8)) : |
322 os::vm_page_size(); |
322 os::vm_page_size(); |
323 const size_t granularity = os::vm_allocation_granularity(); |
323 const size_t granularity = os::vm_allocation_granularity(); |
324 const size_t r_align = MAX2(page_size, granularity); |
324 const size_t r_align = MAX2(page_size, granularity); |
325 const size_t r_size = align_size_up(size, r_align); |
325 const size_t r_size = align_up(size, r_align); |
326 const size_t rs_align = page_size == (size_t) os::vm_page_size() ? 0 : |
326 const size_t rs_align = page_size == (size_t) os::vm_page_size() ? 0 : |
327 MAX2(page_size, granularity); |
327 MAX2(page_size, granularity); |
328 |
328 |
329 ReservedCodeSpace rs(r_size, rs_align, rs_align > 0); |
329 ReservedCodeSpace rs(r_size, rs_align, rs_align > 0); |
330 |
330 |