implement minimalistic talloc_report(); add 't' command on UART

This helps when debugging the firmware, as it shows the current
utliization of the 10-msgb-talloc pool.

Change-Id: Ib10c4396cd4c9c4a6257cf45886e367214787927
Related: OS#4251
This commit is contained in:
Harald Welte
2019-12-14 21:11:39 +01:00
parent 7c1d85eb4d
commit 63c9e1f402
3 changed files with 21 additions and 0 deletions

View File

@@ -17,6 +17,7 @@
#pragma once
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
/* minimalistic emulation of core talloc API functions used by msgb.c */
@@ -39,3 +40,4 @@ void *talloc_named_const(const void *context, size_t size, const char *name);
void talloc_set_name_const(const void *ptr, const char *name);
char *talloc_strdup(const void *t, const char *p);
void *talloc_pool(const void *context, size_t size);
void talloc_report(const void *ptr, FILE *f);