GeezerVison is showing github.com — Try not using direct memory? · netty/netty@62a3fd2
File tree
Expand file treeCollapse file tree
Open diff view settings
buffer/src/test/java/io/netty/buffer
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: buffer/src/test/java/io/netty/buffer/AdaptiveByteBufAllocatorTest.java +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -298,7 +298,7 @@ void concurrentBufferAllocateAndGrowth(RepetitionInfo info) throws Exception { |
298 | 298 | bufSizeGrowth = 1024; |
299 | 299 | } |
300 | 300 |
|
301 | | - AdaptiveByteBufAllocator allocator = newAllocator(true); |
| 301 | + AdaptiveByteBufAllocator allocator = newAllocator(false); |
302 | 302 | int threadCount = 20; |
303 | 303 | CountDownLatch startLatch = new CountDownLatch(1); |
304 | 304 | List<Future<Void>> futures = new ArrayList<>(); |
@@ -311,7 +311,7 @@ void concurrentBufferAllocateAndGrowth(RepetitionInfo info) throws Exception { |
311 | 311 | // Allocate buffers in various sizes. |
312 | 312 | // In the BuddyChunk, we'll exercise different buddy tree levels. |
313 | 313 | int initialSize = bufSizeBase + rng.nextInt(bufSizeAdditional); |
314 | | - ByteBuf buf = allocator.directBuffer(initialSize); |
| 314 | + ByteBuf buf = allocator.heapBuffer(initialSize); |
315 | 315 | try { |
316 | 316 | // Grow the buffer, which will allocate more space, and deallocate the old space. |
317 | 317 | int growth = rng.nextInt(bufSizeGrowth); |
|