Threading/memory improvements at nr-softmodem end

- First stop threads then free memory
- Don't call kill_NR_RU_proc() twice (is called in stop_RU())
- Memory allocation optimizations
This commit is contained in:
Robert Schmidt
2022-08-16 14:41:02 +02:00
parent 604d52a431
commit 76f399cdd6
3 changed files with 13 additions and 14 deletions
+4 -6
View File
@@ -833,14 +833,12 @@ int main( int argc, char **argv ) {
/* release memory used by the RU/gNB threads (incomplete), after all
* threads have been stopped (they partially use the same memory) */
for (int inst = 0; inst < NB_gNB_INST; inst++) {
//free_transport(RC.gNB[inst]);
phy_free_nr_gNB(RC.gNB[inst]);
for (int inst = 0; inst < NB_RU; inst++) {
nr_phy_free_RU(RC.ru[inst]);
}
for (int inst = 0; inst < NB_RU; inst++) {
kill_NR_RU_proc(inst);
nr_phy_free_RU(RC.ru[inst]);
for (int inst = 0; inst < NB_gNB_INST; inst++) {
phy_free_nr_gNB(RC.gNB[inst]);
}
pthread_cond_destroy(&sync_cond);