From 631c6966963d001a61d0b4d7f441e3d45f82105d Mon Sep 17 00:00:00 2001 From: John Thiltges Date: Thu, 17 Aug 2017 18:28:28 -0500 Subject: [PATCH] XrdBuffer: Decrement total buffer count when freeing buffers If the total buffer count (totbuf) is incorrectly high, the request profile (bufprof) will also be disproportionately high: it's scaled by the buffer count. The buffer pool is not reshaped and too much memory is held. --- src/Xrd/XrdBuffer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Xrd/XrdBuffer.cc b/src/Xrd/XrdBuffer.cc index 314adcc0050..aed0881dbee 100644 --- a/src/Xrd/XrdBuffer.cc +++ b/src/Xrd/XrdBuffer.cc @@ -290,6 +290,7 @@ while(1) delete bp; bucket[i].numbuf--; numfreed++; memhave -= memslot; totalo -= memslot; + totbuf--; } else {bucket[i].numbuf = 0; break;} Reshaper.UnLock(); memslot = memslot>>1;