Mercurial > hg > graal-compiler
diff src/share/vm/runtime/arguments.cpp @ 1871:75b0735b4d04
Merge
author | acorn |
---|---|
date | Wed, 13 Oct 2010 11:46:46 -0400 |
parents | b6aedd1acdc0 22e4420d19f7 |
children | 4e22405d98d6 |
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp Tue Oct 12 10:57:33 2010 -0400 +++ b/src/share/vm/runtime/arguments.cpp Wed Oct 13 11:46:46 2010 -0400 @@ -1266,12 +1266,30 @@ // Object alignment. if (!is_power_of_2(ObjectAlignmentInBytes)) { jio_fprintf(defaultStream::error_stream(), - "error: ObjectAlignmentInBytes=%d must be power of 2", (int)ObjectAlignmentInBytes); + "error: ObjectAlignmentInBytes=%d must be power of 2\n", + (int)ObjectAlignmentInBytes); return false; } if ((int)ObjectAlignmentInBytes < BytesPerLong) { jio_fprintf(defaultStream::error_stream(), - "error: ObjectAlignmentInBytes=%d must be greater or equal %d", (int)ObjectAlignmentInBytes, BytesPerLong); + "error: ObjectAlignmentInBytes=%d must be greater or equal %d\n", + (int)ObjectAlignmentInBytes, BytesPerLong); + return false; + } + // It does not make sense to have big object alignment + // since a space lost due to alignment will be greater + // then a saved space from compressed oops. + if ((int)ObjectAlignmentInBytes > 256) { + jio_fprintf(defaultStream::error_stream(), + "error: ObjectAlignmentInBytes=%d must not be greater then 256\n", + (int)ObjectAlignmentInBytes); + return false; + } + // In case page size is very small. + if ((int)ObjectAlignmentInBytes >= os::vm_page_size()) { + jio_fprintf(defaultStream::error_stream(), + "error: ObjectAlignmentInBytes=%d must be less then page size %d\n", + (int)ObjectAlignmentInBytes, os::vm_page_size()); return false; } return true;