diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/bts.c | 6 | ||||
-rw-r--r-- | src/osmo-bts-sysmo/main.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/common/bts.c b/src/common/bts.c index 3fa2bddc..e0a8a07e 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -78,6 +78,7 @@ int bts_init(struct gsm_bts *bts) struct gsm_bts_trx *trx; int rc; static int initialized = 0; + void *tall_rtp_ctx; /* add to list of BTSs */ llist_add_tail(&bts->list, &bts_gsmnet.bts_list); @@ -142,7 +143,10 @@ int bts_init(struct gsm_bts *bts) tpp->ramp.step_interval_sec = 1; } - osmo_rtp_init(tall_bts_ctx); + /* allocate a talloc pool for ORTP to ensure it doesn't have to go back + * to the libc malloc all the time */ + tall_rtp_ctx = talloc_pool(tall_bts_ctx, 262144); + osmo_rtp_init(tall_rtp_ctx); rc = bts_model_init(bts); if (rc < 0) { diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index 0b2b9ff3..9984e3cf 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -312,7 +312,7 @@ int main(int argc, char **argv) int rc; tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context"); - tall_msgb_ctx = talloc_named_const(tall_bts_ctx, 1, "msgb"); + tall_msgb_ctx = talloc_pool(tall_bts_ctx, 100*1024); msgb_set_talloc_ctx(tall_msgb_ctx); bts_log_init(NULL); |