Sorry, I missed something in 5ea200480df332215235e13bb02035d460cd5a46. The `vector::shrink_to_fit` call at [`XrdTpcStream.hh` line 133](https://github.com/xrootd/xrootd/blob/master/src/XrdTpc/XrdTpcStream.hh#L133) relies upon the vector size (which used to be always 0) being less than its capacity. (It seems it's only invoked when ['low buffer occupancy'](https://github.com/xrootd/xrootd/blob/master/src/XrdTpc/XrdTpcStream.cc#L153-L160) is detected.) Now the (size, capacity) will only ever be either (0, 0) or (`m_capacity`, `>=m_capacity`), instead of (0, 0) or (0, `m_capacity`), so `shrink_to_fit` won't be able to fully de-allocate. I don't think it's a functional failure, but it could mean the allocation is retained for longer than expected. By clearing the vector just after its contents are transmitted (and when `m_size` and `m_offset` are reset, marking the buffer as empty and available), `shrink_to_fit` should become effective again. You can view, comment on, or merge this pull request online at: https://github.com/xrootd/xrootd/pull/1639 -- Commit Summary -- * Vector cleared after use so it can be shrunk. -- File Changes -- M src/XrdTpc/XrdTpcStream.hh (1) -- Patch Links -- https://github.com/xrootd/xrootd/pull/1639.patch https://github.com/xrootd/xrootd/pull/1639.diff -- Reply to this email directly or view it on GitHub: https://github.com/xrootd/xrootd/pull/1639 You are receiving this because you are subscribed to this thread. Message ID: <[log in to unmask]> ######################################################################## Use REPLY-ALL to reply to list To unsubscribe from the XROOTD-DEV list, click the following link: https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1