aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-02-23 12:50:05 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-02-23 12:50:05 -0800
commitb82b3d0e528cf46d6583c3e4ba1313a943951ffb (patch)
tree73b6073348a103d6d6b5ac12646f0199f949bc58
parent917ae82908a27004b365282d8a1e46061ce35812 (diff)
Fixes for zalloc
-rw-r--r--test/cpp/microbenchmarks/bm_call_create.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc
index a633b49c65..76d5030276 100644
--- a/test/cpp/microbenchmarks/bm_call_create.cc
+++ b/test/cpp/microbenchmarks/bm_call_create.cc
@@ -312,7 +312,7 @@ static void BM_IsolatedFilter(benchmark::State &state) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
size_t channel_size = grpc_channel_stack_size(&filters[0], filters.size());
grpc_channel_stack *channel_stack =
- static_cast<grpc_channel_stack *>(gpr_malloc(channel_size));
+ static_cast<grpc_channel_stack *>(gpr_zalloc(channel_size));
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"call_stack_init",
grpc_channel_stack_init(&exec_ctx, 1, FilterDestroy, channel_stack,
@@ -323,7 +323,7 @@ static void BM_IsolatedFilter(benchmark::State &state) {
"CHANNEL", channel_stack)));
grpc_exec_ctx_flush(&exec_ctx);
grpc_call_stack *call_stack = static_cast<grpc_call_stack *>(
- gpr_malloc(channel_stack->call_stack_size));
+ gpr_zalloc(channel_stack->call_stack_size));
gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
gpr_timespec start_time = gpr_now(GPR_CLOCK_MONOTONIC);
grpc_slice method = grpc_slice_from_static_string("/foo/bar");