equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
226 |
226 |
227 void Universe::check_alignment(uintx size, uintx alignment, const char* name) { |
227 void Universe::check_alignment(uintx size, uintx alignment, const char* name) { |
228 if (size < alignment || size % alignment != 0) { |
228 if (size < alignment || size % alignment != 0) { |
229 ResourceMark rm; |
229 ResourceMark rm; |
230 stringStream st; |
230 stringStream st; |
231 st.print("Size of %s (%ld bytes) must be aligned to %ld bytes", name, size, alignment); |
231 st.print("Size of %s (" UINTX_FORMAT " bytes) must be aligned to " UINTX_FORMAT " bytes", name, size, alignment); |
232 char* error = st.as_string(); |
232 char* error = st.as_string(); |
233 vm_exit_during_initialization(error); |
233 vm_exit_during_initialization(error); |
234 } |
234 } |
235 } |
235 } |
236 |
236 |