move talloc context creation out of on_dso / constructors
the various constructors get called in a non-obvious, linker determined
order, which makes certain objects disappear from the talloc report.
This change moves the talloc context creation into a new talloc_ctx.c file
diff --git a/openbsc/src/gsm_subscriber.c b/openbsc/src/gsm_subscriber.c
index d91298e..297b8c8 100644
--- a/openbsc/src/gsm_subscriber.c
+++ b/openbsc/src/gsm_subscriber.c
@@ -36,8 +36,8 @@
#include <openbsc/db.h>
LLIST_HEAD(active_subscribers);
-static void *tall_subscr_ctx;
-static void *tall_sub_req_ctx;
+void *tall_subscr_ctx;
+void *tall_sub_req_ctx;
/*
* Struct for pending channel requests. This is managed in the
@@ -282,12 +282,3 @@
if (lchan->subscr && !llist_empty(&lchan->subscr->requests))
subscr_send_paging_request(lchan->subscr);
}
-
-
-static __attribute__((constructor)) void on_dso_load_subscr(void)
-{
- tall_subscr_ctx = talloc_named_const(tall_bsc_ctx, 1, "subscriber");
-
- tall_sub_req_ctx = talloc_named_const(tall_bsc_ctx, 1,
- "subscr_request");
-}