Mercurial > hg > truffle
comparison src/os/linux/vm/os_linux.cpp @ 14328:2c2a99f6cf83
8029775: Solaris code cleanup
8033464: Linux code cleanup
Summary: cleaned up warnings in solaris and linux specific os code.
Reviewed-by: coleenp, fparain, dcubed
Contributed-by: gerald.thornbrugh@oracle.com
author | coleenp |
---|---|
date | Thu, 06 Feb 2014 14:28:35 -0500 |
parents | b59507f713e0 |
children | c2626e4f0c80 |
comparison
equal
deleted
inserted
replaced
14324:c86519f8d826 | 14328:2c2a99f6cf83 |
---|---|
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. |
2998 size_t page_sz = os::vm_page_size(); | 2998 size_t page_sz = os::vm_page_size(); |
2999 unsigned pages = size / page_sz; | 2999 unsigned pages = size / page_sz; |
3000 | 3000 |
3001 unsigned char vec[1]; | 3001 unsigned char vec[1]; |
3002 unsigned imin = 1, imax = pages + 1, imid; | 3002 unsigned imin = 1, imax = pages + 1, imid; |
3003 int mincore_return_value; | 3003 int mincore_return_value = 0; |
3004 | |
3005 assert(imin < imax, "Unexpected page size"); | |
3004 | 3006 |
3005 while (imin < imax) { | 3007 while (imin < imax) { |
3006 imid = (imax + imin) / 2; | 3008 imid = (imax + imin) / 2; |
3007 nbot = ntop - (imid * page_sz); | 3009 nbot = ntop - (imid * page_sz); |
3008 | 3010 |