[PATCH] NAT: move BSC config into separate file

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/OpenBSC@lists.osmocom.org/.

Holger Freyther holger at freyther.de
Thu Mar 31 15:44:25 UTC 2016


> On 31 Mar 2016, at 17:37, msuraev at sysmocom.de wrote:
> 

> +	else
> +		_nat->include_path = talloc_asprintf(_nat, "%s/%s", _nat->include_base, conf);

and this will leak the previous include_path. Please try to get in the habbit of checking memory consumption. My standard approaches for these are:

1.) use the talloc leak report, it is triggered by SIGUSR1 in many of our apps and the output is printed to stdout

2.) Write a script to exercise the new code. E.g. a crazy shell script like this..

( sleep 5s; echo "configure terminal"; echo "nat"; while true; do echo "bsc-co.."') | nc ... 

and use top -p `pidof ..nat` to watch how the memory changes

3.) Use valgrind and the leak check

holger


More information about the OpenBSC mailing list