vty: sub-divide talloc contexts and include them in talloc report
The VTY code makes so many allocations that a full report is
simply too long to provide any useful information. So we sub-divide
it in multiple contexts, and report only one level deep at SIGURS1.
We also introduce SIGUSR2 for the full detailed VTY report.
diff --git a/openbsc/src/vty/vty.c b/openbsc/src/vty/vty.c
index 788c7fd..2339bbd 100644
--- a/openbsc/src/vty/vty.c
+++ b/openbsc/src/vty/vty.c
@@ -1633,6 +1633,8 @@
void vty_init()
{
tall_vty_ctx = talloc_named_const(NULL, 0, "vty");
+ tall_vty_vec_ctx = talloc_named_const(tall_vty_ctx, 0, "vty_vector");
+ tall_vty_cmd_ctx = talloc_named_const(tall_vty_ctx, 0, "vty_command");
/* For further configuration read, preserve current directory. */
vty_save_cwd();