mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8260966: (fs) Consolidate Linux and macOS implementations of UserDefinedFileAttributeView
8260691: (fs) LinuxNativeDispatcher should link to xattr functions Reviewed-by: alanb
This commit is contained in:
parent
5f4bc0aca6
commit
0de6abd4b4
16 changed files with 555 additions and 977 deletions
|
@ -33,7 +33,7 @@ import jdk.internal.ref.CleanerFactory;
|
|||
* A light-weight buffer in native memory.
|
||||
*/
|
||||
|
||||
class NativeBuffer {
|
||||
class NativeBuffer implements AutoCloseable {
|
||||
private static final Unsafe unsafe = Unsafe.getUnsafe();
|
||||
|
||||
private final long address;
|
||||
|
@ -61,6 +61,11 @@ class NativeBuffer {
|
|||
.register(this, new Deallocator(address));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
release();
|
||||
}
|
||||
|
||||
void release() {
|
||||
NativeBuffers.releaseNativeBuffer(this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue