aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_main.cpp
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-01-16 08:43:24 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2013-01-16 09:19:11 +0100
commit7a5a67ab7b59749662e5f08a5861cc9c2c21ebd8 (patch)
treeca434db84330503040b3bc74f1284c1e12946745 /src/pcu_main.cpp
parent97644ed7f8147f99509ac3946666ac11228ea868 (diff)
Use global PCU's talloc context for all talloc calls
This allows to track memory leaks of all memory that is allocated by talloc. Especially bitvector allocations is tracked now.
Diffstat (limited to 'src/pcu_main.cpp')
-rw-r--r--src/pcu_main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp
index 142c9f98..a9e224f9 100644
--- a/src/pcu_main.cpp
+++ b/src/pcu_main.cpp
@@ -39,6 +39,7 @@ static int config_given = 0;
static const char *config_file = "osmo-pcu.cfg";
extern struct vty_app_info pcu_vty_info;
void *tall_pcu_ctx;
+extern void *bv_tall_ctx;
static int quit = 0;
#ifdef DEBUG_DIAGRAM
@@ -140,6 +141,7 @@ int main(int argc, char *argv[])
tall_pcu_ctx = talloc_named_const(NULL, 1, "Osmo-PCU context");
if (!tall_pcu_ctx)
return -ENOMEM;
+ bv_tall_ctx = tall_pcu_ctx;
bts = gprs_rlcmac_bts = talloc_zero(tall_pcu_ctx,
struct gprs_rlcmac_bts);