Chris Vest 1aa439991a Make cleaner in pooledDirectWithCleaner return segments to pool instead of deallocating
Motivation:
 Allocating memory is expensive, which is why we pool our allocations.
 The cleaner, when used with pooled memory, should then return that memory to the pool instead of deallocating it.
 The purpose of the cleaner is, after all, to avoid having to track the reference counts so precisely.

Modification:
 The NativeMemoryCleanerDrop is now able to either recover lost memory segments, when a buffer wasn't closed explicitly
 and is being cleaned by the GC, or return the buffer to the pool via ordinary drop.
 The GatedCleanable has been added, because buffer ownership transfer involves generating new memory segments,
 and in those cases we need to invalidate the old cleanables without deallocating the tracked memory segment or returning
 it to the pool more than once.

Result:
 The pooledDirectWithCleaner allocator is now able to reuse memory segments, even when their references are forgotten and
 they processed by the cleaner thread.
2020-11-17 15:26:57 +01:00
2020-11-17 15:26:57 +01:00

Netty Incubator Buffer API

This repository is incubating a new buffer API proposed for Netty 5.

Description
No description provided
Readme 1.2 MiB
Languages
Java 99.6%
Dockerfile 0.2%
Makefile 0.2%