[MERGED] osmocom-bb[master]: host/trxcon: track talloc NULL contexts by default

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Apr 9 08:26:24 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: host/trxcon: track talloc NULL contexts by default
......................................................................


host/trxcon: track talloc NULL contexts by default

In order to be able to introspect not only the root application
context, but also all other contexts, e.g. allocated within
libosmocore or other libraries, let's enable tracking the
use of NULL contexts using the corresponding talloc API.

Change-Id: Id21cd5ee340def443f7a5d0b2b8f37f41188dd87
---
M src/host/trxcon/trxcon.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/host/trxcon/trxcon.c b/src/host/trxcon/trxcon.c
index 1d0ecc3..c746816 100644
--- a/src/host/trxcon/trxcon.c
+++ b/src/host/trxcon/trxcon.c
@@ -247,6 +247,9 @@
 	init_defaults();
 	handle_options(argc, argv);
 
+	/* Track the use of talloc NULL memory contexts */
+	talloc_enable_null_tracking();
+
 	/* Init talloc memory management system */
 	tall_trx_ctx = talloc_init("trxcon context");
 	msgb_talloc_ctx_init(tall_trx_ctx, 0);

-- 
To view, visit https://gerrit.osmocom.org/7669
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id21cd5ee340def443f7a5d0b2b8f37f41188dd87
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list