77 assert(is_power_of_2(alignment), "no kidding ???"); |
77 assert(is_power_of_2(alignment), "no kidding ???"); |
78 return (size + alignment - 1) & ~(alignment - 1); |
78 return (size + alignment - 1) & ~(alignment - 1); |
79 } |
79 } |
80 |
80 |
81 |
81 |
82 static size_t align_to_allocation_size(size_t size) { |
|
83 const size_t alignment = (size_t)os::vm_allocation_granularity(); |
|
84 assert(is_power_of_2(alignment), "no kidding ???"); |
|
85 return (size + alignment - 1) & ~(alignment - 1); |
|
86 } |
|
87 |
|
88 |
|
89 void CodeHeap::on_code_mapping(char* base, size_t size) { |
82 void CodeHeap::on_code_mapping(char* base, size_t size) { |
90 #ifdef LINUX |
83 #ifdef LINUX |
91 extern void linux_wrap_code(char* base, size_t size); |
84 extern void linux_wrap_code(char* base, size_t size); |
92 linux_wrap_code(base, size); |
85 linux_wrap_code(base, size); |
93 #endif |
86 #endif |