mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8061467: Bad page size passed to setup_large_pages() on Solaris
Reviewed-by: tschatzl, mgerdin
This commit is contained in:
parent
c1bc4be92b
commit
0e54928686
2 changed files with 41 additions and 1 deletions
|
@ -2607,7 +2607,10 @@ void os::pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint) {
|
||||||
assert((intptr_t)addr % alignment_hint == 0, "Address should be aligned.");
|
assert((intptr_t)addr % alignment_hint == 0, "Address should be aligned.");
|
||||||
assert((intptr_t)(addr + bytes) % alignment_hint == 0, "End should be aligned.");
|
assert((intptr_t)(addr + bytes) % alignment_hint == 0, "End should be aligned.");
|
||||||
if (UseLargePages) {
|
if (UseLargePages) {
|
||||||
Solaris::setup_large_pages(addr, bytes, alignment_hint);
|
size_t page_size = Solaris::page_size_for_alignment(alignment_hint);
|
||||||
|
if (page_size > (size_t) vm_page_size()) {
|
||||||
|
Solaris::setup_large_pages(addr, bytes, page_size);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
37
hotspot/test/gc/TestNUMAPageSize.java
Normal file
37
hotspot/test/gc/TestNUMAPageSize.java
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
|
*
|
||||||
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License version 2 only, as
|
||||||
|
* published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
* version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
* accompanied this code).
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License version
|
||||||
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
* or visit www.oracle.com if you need additional information or have any
|
||||||
|
* questions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @test TestNUMAPageSize
|
||||||
|
* @summary Make sure that start up with NUMA support does not cause problems.
|
||||||
|
* @bug 8061467
|
||||||
|
* @key gc
|
||||||
|
* @key regression
|
||||||
|
* @run main/othervm -Xmx8M -XX:+UseNUMA TestNUMAPageSize
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class TestNUMAPageSize {
|
||||||
|
public static void main(String args[]) throws Exception {
|
||||||
|
// nothing to do
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue