aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/microbenchmarks
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-02-27 15:58:23 -0800
committerGravatar GitHub <noreply@github.com>2017-02-27 15:58:23 -0800
commitcd232f64c634cba1e95b30db5d270114db6b1fc4 (patch)
treec009004932fc91897d8ae36c5183362f3c47af43 /test/cpp/microbenchmarks
parent79ccb81b48433df9d56601663851a30de4ea8a6a (diff)
parentb4673fa9ec493deb4b7d2e811654812449f1077e (diff)
Merge pull request #9753 from ctiller/zalloc
Add zalloc, convert a bunch of files to use it
Diffstat (limited to 'test/cpp/microbenchmarks')
-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");