zalloc grpc_pollset

pull/9753/head
Yuchen Zeng 8 years ago
parent ff71449049
commit 47de64c700
  1. 2
      test/core/end2end/fixtures/http_proxy.c
  2. 2
      test/core/http/httpcli_test.c
  3. 2
      test/core/http/httpscli_test.c
  4. 2
      test/core/iomgr/endpoint_pair_test.c
  5. 2
      test/core/iomgr/ev_epoll_linux_test.c
  6. 2
      test/core/iomgr/fd_posix_test.c
  7. 2
      test/core/iomgr/pollset_set_test.c
  8. 2
      test/core/iomgr/resolve_address_posix_test.c
  9. 2
      test/core/iomgr/resolve_address_test.c
  10. 2
      test/core/iomgr/tcp_client_posix_test.c
  11. 2
      test/core/iomgr/tcp_posix_test.c
  12. 2
      test/core/iomgr/tcp_server_posix_test.c
  13. 2
      test/core/iomgr/udp_server_test.c
  14. 2
      test/core/security/oauth2_utils.c
  15. 2
      test/core/security/print_google_default_creds_token.c
  16. 2
      test/core/security/secure_endpoint_test.c
  17. 2
      test/core/security/verify_jwt.c
  18. 2
      test/core/surface/concurrent_connectivity_test.c
  19. 4
      test/core/util/port_server_client.c
  20. 2
      test/core/util/test_tcp_server.c

@ -454,7 +454,7 @@ grpc_end2end_http_proxy* grpc_end2end_http_proxy_create(void) {
GPR_ASSERT(error == GRPC_ERROR_NONE);
GPR_ASSERT(port == proxy_port);
// Start server.
proxy->pollset = gpr_malloc(grpc_pollset_size());
proxy->pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(proxy->pollset, &proxy->mu);
grpc_tcp_server_start(&exec_ctx, proxy->server, &proxy->pollset, 1, on_accept,
proxy);

@ -202,7 +202,7 @@ int main(int argc, char **argv) {
grpc_test_init(argc, argv);
grpc_init();
grpc_httpcli_context_init(&g_context);
grpc_pollset *pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset *pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(pollset, &g_mu);
g_pops = grpc_polling_entity_create_from_pollset(pollset);

@ -205,7 +205,7 @@ int main(int argc, char **argv) {
grpc_test_init(argc, argv);
grpc_init();
grpc_httpcli_context_init(&g_context);
grpc_pollset *pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset *pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(pollset, &g_mu);
g_pops = grpc_polling_entity_create_from_pollset(pollset);

@ -78,7 +78,7 @@ int main(int argc, char **argv) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_test_init(argc, argv);
grpc_init();
g_pollset = gpr_malloc(grpc_pollset_size());
g_pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
grpc_endpoint_tests(configs[0], g_pollset, g_mu);
grpc_closure_init(&destroyed, destroy_pollset, g_pollset,

@ -104,7 +104,7 @@ static void test_fd_cleanup(grpc_exec_ctx *exec_ctx, test_fd *tfds,
static void test_pollset_init(test_pollset *pollsets, int num_pollsets) {
int i;
for (i = 0; i < num_pollsets; i++) {
pollsets[i].pollset = gpr_malloc(grpc_pollset_size());
pollsets[i].pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(pollsets[i].pollset, &pollsets[i].mu);
}
}

@ -543,7 +543,7 @@ int main(int argc, char **argv) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_test_init(argc, argv);
grpc_iomgr_init();
g_pollset = gpr_malloc(grpc_pollset_size());
g_pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
test_grpc_fd();
test_grpc_fd_change();

@ -79,7 +79,7 @@ typedef struct test_pollset {
static void init_test_pollsets(test_pollset *pollsets, const int num_pollsets) {
for (int i = 0; i < num_pollsets; i++) {
pollsets[i].ps = gpr_malloc(grpc_pollset_size());
pollsets[i].ps = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(pollsets[i].ps, &pollsets[i].mu);
}
}

@ -63,7 +63,7 @@ static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {}
void args_init(grpc_exec_ctx *exec_ctx, args_struct *args) {
gpr_event_init(&args->ev);
args->pollset = gpr_malloc(grpc_pollset_size());
args->pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(args->pollset, &args->mu);
args->pollset_set = grpc_pollset_set_create();
grpc_pollset_set_add_pollset(exec_ctx, args->pollset_set, args->pollset);

@ -58,7 +58,7 @@ static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {}
void args_init(grpc_exec_ctx *exec_ctx, args_struct *args) {
gpr_event_init(&args->ev);
args->pollset = gpr_malloc(grpc_pollset_size());
args->pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(args->pollset, &args->mu);
args->pollset_set = grpc_pollset_set_create();
grpc_pollset_set_add_pollset(exec_ctx, args->pollset_set, args->pollset);

@ -200,7 +200,7 @@ int main(int argc, char **argv) {
grpc_test_init(argc, argv);
grpc_init();
g_pollset_set = grpc_pollset_set_create();
g_pollset = gpr_malloc(grpc_pollset_size());
g_pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
grpc_pollset_set_add_pollset(&exec_ctx, g_pollset_set, g_pollset);
grpc_exec_ctx_finish(&exec_ctx);

@ -561,7 +561,7 @@ int main(int argc, char **argv) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_test_init(argc, argv);
grpc_init();
g_pollset = gpr_malloc(grpc_pollset_size());
g_pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
grpc_endpoint_tests(configs[0], g_pollset, g_mu);
run_tests();

@ -457,7 +457,7 @@ int main(int argc, char **argv) {
test_addrs dst_addrs;
grpc_test_init(argc, argv);
grpc_init();
g_pollset = gpr_malloc(grpc_pollset_size());
g_pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
test_no_op();

@ -237,7 +237,7 @@ int main(int argc, char **argv) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_test_init(argc, argv);
grpc_init();
g_pollset = gpr_malloc(grpc_pollset_size());
g_pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
test_no_op();

@ -87,7 +87,7 @@ char *grpc_test_fetch_oauth2_token_with_credentials(
grpc_closure do_nothing_closure;
grpc_auth_metadata_context null_ctx = {"", "", NULL, NULL};
grpc_pollset *pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset *pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(pollset, &request.mu);
request.pops = grpc_polling_entity_create_from_pollset(pollset);
request.is_done = 0;

@ -98,7 +98,7 @@ int main(int argc, char **argv) {
goto end;
}
grpc_pollset *pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset *pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(pollset, &sync.mu);
sync.pops = grpc_polling_entity_create_from_pollset(pollset);
sync.is_done = 0;

@ -190,7 +190,7 @@ int main(int argc, char **argv) {
grpc_test_init(argc, argv);
grpc_init();
g_pollset = gpr_malloc(grpc_pollset_size());
g_pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(g_pollset, &g_mu);
grpc_endpoint_tests(configs[0], g_pollset, g_mu);
test_leftover(configs[1], 1);

@ -106,7 +106,7 @@ int main(int argc, char **argv) {
grpc_init();
sync.pollset = gpr_malloc(grpc_pollset_size());
sync.pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(sync.pollset, &sync.mu);
sync.is_done = 0;

@ -215,7 +215,7 @@ int main(int argc, char **argv) {
/* Third round, bogus tcp server */
gpr_log(GPR_DEBUG, "Wave 3");
args.pollset = gpr_malloc(grpc_pollset_size());
args.pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(args.pollset, &args.mu);
gpr_event_init(&args.ready);
gpr_thd_new(&server, bad_server_thread, &args, &options);

@ -89,7 +89,7 @@ void grpc_free_port_using_server(char *server, int port) {
memset(&req, 0, sizeof(req));
memset(&rsp, 0, sizeof(rsp));
grpc_pollset *pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset *pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(pollset, &pr.mu);
pr.pops = grpc_polling_entity_create_from_pollset(pollset);
shutdown_closure = grpc_closure_create(destroy_pops_and_shutdown, &pr.pops,
@ -209,7 +209,7 @@ int grpc_pick_port_using_server(char *server) {
memset(&pr, 0, sizeof(pr));
memset(&req, 0, sizeof(req));
grpc_pollset *pollset = gpr_malloc(grpc_pollset_size());
grpc_pollset *pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(pollset, &pr.mu);
pr.pops = grpc_polling_entity_create_from_pollset(pollset);
shutdown_closure = grpc_closure_create(destroy_pops_and_shutdown, &pr.pops,

@ -60,7 +60,7 @@ void test_tcp_server_init(test_tcp_server *server,
grpc_closure_init(&server->shutdown_complete, on_server_destroyed, server,
grpc_schedule_on_exec_ctx);
server->shutdown = 0;
server->pollset = gpr_malloc(grpc_pollset_size());
server->pollset = gpr_zalloc(grpc_pollset_size());
grpc_pollset_init(server->pollset, &server->mu);
server->on_connect = on_connect;
server->cb_data = user_data;

Loading…
Cancel
Save