Mercurial > hg > graal-compiler
changeset 10358:0def34ab1c98
8015007: Incorrect print format in error message for VM cannot allocate the requested heap
Summary: 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
Contributed-by: tamao <tao.mao@oracle.com>
author | tamao |
---|---|
date | Tue, 21 May 2013 16:43:41 -0700 |
parents | 7c5a1b62f53d |
children | 14d3f71f831d |
files | src/share/vm/memory/universe.cpp |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/memory/universe.cpp Wed May 22 08:04:58 2013 +0200 +++ b/src/share/vm/memory/universe.cpp Tue May 21 16:43:41 2013 -0700 @@ -228,11 +228,8 @@ 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 @@ } 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; }