Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/15981 )
Change subject: replace shared_ptr(new T) with make_shared<T>() ...................................................................... replace shared_ptr(new T) with make_shared<T>() This patch replaces std::shared_ptr(new T(...)) pattern with std::make_share<T>(...). The motivation of this changelist was to reduce number of allocation in the heap. For details, see 'Notes' section at https://en.cppreference.com/w/cpp/memory/shared_ptr/make_shared I didn't touch sp::shared_ptr-related pieces in KuduClient to avoid template meta-programming: not sure it's worth it. I also did other minor changes regarding 'using std::make_shared', etc. Change-Id: I9bcca0287d484472f7cc616f553060fe83faab1a Reviewed-on: http://gerrit.cloudera.org:8080/15981 Reviewed-by: Andrew Wong <[email protected]> Tested-by: Andrew Wong <[email protected]> --- M src/kudu/consensus/consensus_peers.cc M src/kudu/consensus/consensus_peers.h M src/kudu/hms/hms_client.cc M src/kudu/integration-tests/cluster_verifier.cc M src/kudu/master/placement_policy-test.cc M src/kudu/mini-cluster/internal_mini_cluster.cc M src/kudu/tablet/cfile_set.cc M src/kudu/tablet/cfile_set.h M src/kudu/tablet/deltamemstore.cc M src/kudu/tablet/deltamemstore.h M src/kudu/tablet/diskrowset.cc M src/kudu/tablet/diskrowset.h M src/kudu/tablet/memrowset.cc M src/kudu/tablet/memrowset.h M src/kudu/tablet/rowset_tree-test.cc M src/kudu/tablet/tablet-test.cc M src/kudu/tablet/tablet.cc M src/kudu/tools/ksck-test.cc M src/kudu/tools/ksck_remote.cc M src/kudu/tools/tool_action_cluster.cc M src/kudu/tserver/tablet_server-test.cc M src/kudu/tserver/tablet_server_authorization-test.cc M src/kudu/util/make_shared.h M src/kudu/util/test_graph.cc M src/kudu/util/test_graph.h M src/kudu/util/threadpool-test.cc 26 files changed, 241 insertions(+), 227 deletions(-) Approvals: Andrew Wong: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/15981 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I9bcca0287d484472f7cc616f553060fe83faab1a Gerrit-Change-Number: 15981 Gerrit-PatchSet: 5 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241)
