mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8015007: Incorrect print format in error message for VM cannot allocate the requested heap
Correct the wrong print format in error message for VM cannot allocate the requested heap; and clean up the error message call in check_alignment() Reviewed-by: brutisso, tschatzl
This commit is contained in:
parent
0be2f273c7
commit
a50a5688af
1 changed files with 3 additions and 6 deletions
|
@ -228,11 +228,8 @@ void Universe::serialize(SerializeClosure* f, bool do_all) {
|
|||
|
||||
void Universe::check_alignment(uintx size, uintx alignment, const char* name) {
|
||||
if (size < alignment || size % alignment != 0) {
|
||||
ResourceMark rm;
|
||||
stringStream st;
|
||||
st.print("Size of %s (" UINTX_FORMAT " bytes) must be aligned to " UINTX_FORMAT " bytes", name, size, alignment);
|
||||
char* error = st.as_string();
|
||||
vm_exit_during_initialization(error);
|
||||
vm_exit_during_initialization(
|
||||
err_msg("Size of %s (" UINTX_FORMAT " bytes) must be aligned to " UINTX_FORMAT " bytes", name, size, alignment));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -916,7 +913,7 @@ ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) {
|
|||
}
|
||||
|
||||
if (!total_rs.is_reserved()) {
|
||||
vm_exit_during_initialization(err_msg("Could not reserve enough space for object heap %d bytes", total_reserved));
|
||||
vm_exit_during_initialization(err_msg("Could not reserve enough space for " SIZE_FORMAT "KB object heap", total_reserved/K));
|
||||
return total_rs;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue