Mercurial > hg > graal-jvmci-8
comparison src/os/linux/vm/os_linux.cpp @ 17765:91dc38ae09f3
8033464: Linux code cleanup
8033931: Several nightly tests failing with assert(imin < imax) failed: Unexpected page size
Summary: cleaned up warnings in linux specific os code.
Reviewed-by: dcubed, hseigel, coleenp, dsamersoff
Contributed-by: gerald.thornbrugh@oracle.com
author | dcubed |
---|---|
date | Mon, 24 Mar 2014 13:36:32 -0700 |
parents | 8cfe6fdbb99a |
children | 62c54fcc0a35 |
comparison
equal
deleted
inserted
replaced
17763:6e7e363c5a8f | 17765:91dc38ae09f3 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2014, 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. |
3012 size_t page_sz = os::vm_page_size(); | 3012 size_t page_sz = os::vm_page_size(); |
3013 unsigned pages = size / page_sz; | 3013 unsigned pages = size / page_sz; |
3014 | 3014 |
3015 unsigned char vec[1]; | 3015 unsigned char vec[1]; |
3016 unsigned imin = 1, imax = pages + 1, imid; | 3016 unsigned imin = 1, imax = pages + 1, imid; |
3017 int mincore_return_value; | 3017 int mincore_return_value = 0; |
3018 | |
3019 assert(imin <= imax, "Unexpected page size"); | |
3018 | 3020 |
3019 while (imin < imax) { | 3021 while (imin < imax) { |
3020 imid = (imax + imin) / 2; | 3022 imid = (imax + imin) / 2; |
3021 nbot = ntop - (imid * page_sz); | 3023 nbot = ntop - (imid * page_sz); |
3022 | 3024 |