aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-09-23 09:10:08 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-09-23 09:10:08 -0700
commit9cf0cec74c81e122864a0a11109c787fe8b452cd (patch)
tree49510a6647d66cf6bdcb3b563b489b4e84d73b1f /src
parent6b72834c8aa215e90e8f4d47bbe4e4a65521b8c8 (diff)
Fairly complete set of tests for buffer pools in place
Diffstat (limited to 'src')
-rw-r--r--src/core/lib/iomgr/buffer_pool.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c
index d2464ff079..c7e1fcbf4a 100644
--- a/src/core/lib/iomgr/buffer_pool.c
+++ b/src/core/lib/iomgr/buffer_pool.c
@@ -162,10 +162,6 @@ static void bpstep_sched(grpc_exec_ctx *exec_ctx,
/* returns true if all allocations are completed */
static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) {
- if (buffer_pool->free_pool <= 0) {
- return false;
- }
-
grpc_buffer_user *buffer_user;
while ((buffer_user =
bulist_pop(buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION))) {
@@ -308,7 +304,9 @@ static void bp_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) {
static void bpreclaimation_done_closure(grpc_exec_ctx *exec_ctx, void *bp,
grpc_error *error) {
- bpstep_sched(exec_ctx, bp);
+ grpc_buffer_pool *buffer_pool = bp;
+ buffer_pool->reclaiming = false;
+ bpstep_sched(exec_ctx, buffer_pool);
}
/*******************************************************************************