Browse Source

comment buf_shrink

svn:r4168
Roger Dingledine 20 years ago
parent
commit
aa6bcd50ca
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/or/buffers.c

+ 5 - 0
src/or/buffers.c

@@ -244,6 +244,11 @@ static INLINE void buf_shrink_if_underfull(buf_t *buf) {
 #define buf_shrink_if_underfull(buf) do {} while (0)
 #endif
 
+/** Resize buf so it won't hold extra memory that we haven't
+ * been using lately. Try to shrink the buf until it is the
+ * largest factor of two that can contain highwater, but never
+ * smaller than MIN_LAZY_SHRINK_SIZE.
+ */
 void
 buf_shrink(buf_t *buf)
 {