< prev index next >
src/java.base/unix/classes/sun/nio/ch/FileDispatcherImpl.java
Print this page
rev 16200 : 8168628: (fc) SIGBUS when extending file size to map it
Summary: Synchronize file extension and subsequent map0(); on Linux use fallocate64() instead of ftruncate64().
Reviewed-by: rehn, simonis, alanb
*** 1,7 ****
/*
! * Copyright (c) 2000, 2013, 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. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2000, 2016, 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. Oracle designates this
*** 74,83 ****
--- 74,87 ----
int truncate(FileDescriptor fd, long size) throws IOException {
return truncate0(fd, size);
}
+ int allocate(FileDescriptor fd, long size) throws IOException {
+ return allocate0(fd, size);
+ }
+
long size(FileDescriptor fd) throws IOException {
return size0(fd);
}
int lock(FileDescriptor fd, boolean blocking, long pos, long size,
*** 136,145 ****
--- 140,152 ----
throws IOException;
static native int truncate0(FileDescriptor fd, long size)
throws IOException;
+ static native int allocate0(FileDescriptor fd, long size)
+ throws IOException;
+
static native long size0(FileDescriptor fd) throws IOException;
static native int lock0(FileDescriptor fd, boolean blocking, long pos,
long size, boolean shared) throws IOException;
< prev index next >