src/share/vm/runtime/arguments.cpp

changeset 2226
75b0735b4d04
parent 2222
b6aedd1acdc0
parent 2187
22e4420d19f7
child 2230
4e22405d98d6
     1.1 --- a/src/share/vm/runtime/arguments.cpp	Tue Oct 12 10:57:33 2010 -0400
     1.2 +++ b/src/share/vm/runtime/arguments.cpp	Wed Oct 13 11:46:46 2010 -0400
     1.3 @@ -1266,12 +1266,30 @@
     1.4    // Object alignment.
     1.5    if (!is_power_of_2(ObjectAlignmentInBytes)) {
     1.6      jio_fprintf(defaultStream::error_stream(),
     1.7 -                "error: ObjectAlignmentInBytes=%d must be power of 2", (int)ObjectAlignmentInBytes);
     1.8 +                "error: ObjectAlignmentInBytes=%d must be power of 2\n",
     1.9 +                (int)ObjectAlignmentInBytes);
    1.10      return false;
    1.11    }
    1.12    if ((int)ObjectAlignmentInBytes < BytesPerLong) {
    1.13      jio_fprintf(defaultStream::error_stream(),
    1.14 -                "error: ObjectAlignmentInBytes=%d must be greater or equal %d", (int)ObjectAlignmentInBytes, BytesPerLong);
    1.15 +                "error: ObjectAlignmentInBytes=%d must be greater or equal %d\n",
    1.16 +                (int)ObjectAlignmentInBytes, BytesPerLong);
    1.17 +    return false;
    1.18 +  }
    1.19 +  // It does not make sense to have big object alignment
    1.20 +  // since a space lost due to alignment will be greater
    1.21 +  // then a saved space from compressed oops.
    1.22 +  if ((int)ObjectAlignmentInBytes > 256) {
    1.23 +    jio_fprintf(defaultStream::error_stream(),
    1.24 +                "error: ObjectAlignmentInBytes=%d must not be greater then 256\n",
    1.25 +                (int)ObjectAlignmentInBytes);
    1.26 +    return false;
    1.27 +  }
    1.28 +  // In case page size is very small.
    1.29 +  if ((int)ObjectAlignmentInBytes >= os::vm_page_size()) {
    1.30 +    jio_fprintf(defaultStream::error_stream(),
    1.31 +                "error: ObjectAlignmentInBytes=%d must be less then page size %d\n",
    1.32 +                (int)ObjectAlignmentInBytes, os::vm_page_size());
    1.33      return false;
    1.34    }
    1.35    return true;

mercurial