mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8264827: Large mapped buffer/segment crash the VM when calling isLoaded
Reviewed-by: alanb, mcimadamore
This commit is contained in:
parent
e604320bbd
commit
3c9858ddfb
5 changed files with 36 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2021, 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
|
||||
|
@ -75,8 +75,8 @@ class Bits { // package-private
|
|||
return PAGE_SIZE;
|
||||
}
|
||||
|
||||
static int pageCount(long size) {
|
||||
return (int)(size + (long)pageSize() - 1L) / pageSize();
|
||||
static long pageCount(long size) {
|
||||
return (size + (long)pageSize() - 1L) / pageSize();
|
||||
}
|
||||
|
||||
private static boolean UNALIGNED = UNSAFE.unalignedAccess();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue