forked from netty/netty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable PooledByteBufAllocator to work, event without a cache
Motivation: `useCacheForAllThreads` may be false which disables memory caching on non netty threads. Setting this argument or the system property makes it impossible to use `PooledByteBufAllocator`. Modifications: Delayed the check of `freeSweepAllocationThreshold` in `PoolThreadCache` to after it knows there will be any caches in use. Additionally, check if the caches will have any data in them (rather than allocating a 0-length array). A test case is also added that fails without this change. Results: Fixes netty#7194
- Loading branch information
1 parent
c039681
commit d2cb51b
Showing
2 changed files
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters