comparison src/share/vm/utilities/globalDefinitions.hpp @ 14435:da862781b584

Merge
author kvn
date Thu, 21 Nov 2013 12:30:35 -0800
parents 2b8e28fdf503 610be0309a79
children c6d7e7406136
comparison
equal deleted inserted replaced
14434:318d0622a6d7 14435:da862781b584
455 return align_size_up(offset, HeapWordsPerLong); 455 return align_size_up(offset, HeapWordsPerLong);
456 } 456 }
457 457
458 inline void* align_pointer_up(const void* addr, size_t size) { 458 inline void* align_pointer_up(const void* addr, size_t size) {
459 return (void*) align_size_up_((uintptr_t)addr, size); 459 return (void*) align_size_up_((uintptr_t)addr, size);
460 }
461
462 // Align down with a lower bound. If the aligning results in 0, return 'alignment'.
463
464 inline size_t align_size_down_bounded(size_t size, size_t alignment) {
465 size_t aligned_size = align_size_down_(size, alignment);
466 return aligned_size > 0 ? aligned_size : alignment;
460 } 467 }
461 468
462 // Clamp an address to be within a specific page 469 // Clamp an address to be within a specific page
463 // 1. If addr is on the page it is returned as is 470 // 1. If addr is on the page it is returned as is
464 // 2. If addr is above the page_address the start of the *next* page will be returned 471 // 2. If addr is above the page_address the start of the *next* page will be returned