Java Code Examples for io.netty.util.internal.PlatformDependent#freeMemory()

The following examples show how to use io.netty.util.internal.PlatformDependent#freeMemory() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WrappedUnpooledUnsafeDirectByteBuf.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
protected void freeDirect(ByteBuffer buffer) {
    PlatformDependent.freeMemory(memoryAddress);
}
 
Example 2
Source File: KQueueEventArray.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
/**
 * Free this {@link KQueueEventArray}. Any usage after calling this method may segfault the JVM!
 */
void free() {
    PlatformDependent.freeMemory(memoryAddress);
    memoryAddress = size = capacity = 0;
}
 
Example 3
Source File: NativeLongArray.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
void free() {
    PlatformDependent.freeMemory(memoryAddress);
    memoryAddress = 0;
}
 
Example 4
Source File: EpollEventArray.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
/**
 * Free this {@link EpollEventArray}. Any usage after calling this method may segfault the JVM!
 */
void free() {
    PlatformDependent.freeMemory(memoryAddress);
}
 
Example 5
Source File: IovArray.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
/**
 * Release the {@link IovArray}. Once release further using of it may crash the JVM!
 */
void release() {
    PlatformDependent.freeMemory(memoryAddress);
}
 
Example 6
Source File: EpollEventArray.java    From netty-4.1.22 with Apache License 2.0 2 votes vote down vote up
/**
 * Free this {@link EpollEventArray}. Any usage after calling this method may segfault the JVM!
 * 这个EpollEventArray免费。调用此方法后的任何用法都可能导致JVM故障!
 */
void free() {
    PlatformDependent.freeMemory(memoryAddress);
}