GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove usedMemory atomic counters on adaptive magazines (#15677) (#15… · netty/netty@dda4ee6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • buffer/src/main/java/io/netty/buffer
    • AdaptivePoolingAllocator.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java‎

Copy file name to clipboardExpand all lines: buffer/src/main/java/io/netty/buffer/AdaptivePoolingAllocator.java
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import java.util.Queue;
5151
import java.util.concurrent.ConcurrentLinkedQueue;
5252
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
53-
import java.util.concurrent.atomic.AtomicLong;
5453
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
5554
import java.util.concurrent.atomic.LongAdder;
5655
import java.util.concurrent.locks.StampedLock;
@@ -837,7 +836,6 @@ public AdaptiveByteBuf newObject(ObjectPool.Handle<AdaptiveByteBuf> handle) {
837836
private volatile Chunk nextInLine;
838837
private final MagazineGroup group;
839838
private final ChunkController chunkController;
840-
private final AtomicLong usedMemory;
841839
private final StampedLock allocationLock;
842840
private final Queue<AdaptiveByteBuf> bufferQueue;
843841
private final ObjectPool.Handle<AdaptiveByteBuf> handle;
@@ -863,7 +861,6 @@ public void recycle(AdaptiveByteBuf self) {
863861
bufferQueue = null;
864862
handle = null;
865863
}
866-
usedMemory = new AtomicLong();
867864
this.sharedChunkQueue = sharedChunkQueue;
868865
}
869866

@@ -1189,15 +1186,13 @@ Magazine currentMagazine() {
11891186

11901187
void detachFromMagazine() {
11911188
if (magazine != null) {
1192-
magazine.usedMemory.getAndAdd(-capacity);
11931189
magazine = null;
11941190
}
11951191
}
11961192

11971193
void attachToMagazine(Magazine magazine) {
11981194
assert this.magazine == null;
11991195
this.magazine = magazine;
1200-
magazine.usedMemory.getAndAdd(capacity);
12011196
}
12021197

12031198
@Override

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.