Skip to content

Commit

Permalink
trim on shrinking
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed May 19, 2024
1 parent 5fd40aa commit 59d9f6c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ww/buffer_pool.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "buffer_pool.h"
#include <malloc.h>
#ifdef DEBUG
#include "loggers/network_logger.h"
#endif
Expand Down Expand Up @@ -60,6 +61,7 @@ static void giveMemBackToOs(buffer_pool_t *pool)
#ifdef DEBUG
LOGD("BufferPool: freed %d buffers, %zu are in use", decrease, pool->in_use);
#endif
malloc_trim(0);
}

shift_buffer_t *popBuffer(buffer_pool_t *pool)
Expand Down

0 comments on commit 59d9f6c

Please sign in to comment.