free memory on teardown after all RU/eNB threads have been released
This commit is contained in:
@@ -1139,10 +1139,5 @@ void stop_eNB(int nb_inst) {
|
|||||||
for (int inst=0;inst<nb_inst;inst++) {
|
for (int inst=0;inst<nb_inst;inst++) {
|
||||||
LOG_I(PHY,"Killing eNB %d processing threads\n",inst);
|
LOG_I(PHY,"Killing eNB %d processing threads\n",inst);
|
||||||
kill_eNB_proc(inst);
|
kill_eNB_proc(inst);
|
||||||
/* release memory used by these threads (incomplete) */
|
|
||||||
for (int cc_id = 0; cc_id < RC.nb_CC[inst]; cc_id++) {
|
|
||||||
free_transport(RC.eNB[inst][cc_id]);
|
|
||||||
phy_free_lte_eNB(RC.eNB[inst][cc_id]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2251,8 +2251,6 @@ void stop_RU(int nb_ru)
|
|||||||
for (int inst = 0; inst < nb_ru; inst++) {
|
for (int inst = 0; inst < nb_ru; inst++) {
|
||||||
LOG_I(PHY, "Stopping RU %d processing threads\n", inst);
|
LOG_I(PHY, "Stopping RU %d processing threads\n", inst);
|
||||||
kill_RU_proc(inst);
|
kill_RU_proc(inst);
|
||||||
/* release memory used by these threads (incomplete) */
|
|
||||||
phy_free_RU(RC.ru[inst]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1594,6 +1594,17 @@ int main( int argc, char **argv )
|
|||||||
} else {
|
} else {
|
||||||
stop_eNB(NB_eNB_INST);
|
stop_eNB(NB_eNB_INST);
|
||||||
stop_RU(NB_RU);
|
stop_RU(NB_RU);
|
||||||
|
/* release memory used by the RU/eNB threads (incomplete), after all
|
||||||
|
* threads have been stopped (they partially use the same memory) */
|
||||||
|
for (int inst = 0; inst < NB_eNB_INST; inst++) {
|
||||||
|
for (int cc_id = 0; cc_id < RC.nb_CC[inst]; cc_id++) {
|
||||||
|
free_transport(RC.eNB[inst][cc_id]);
|
||||||
|
phy_free_lte_eNB(RC.eNB[inst][cc_id]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int inst = 0; inst < NB_RU; inst++) {
|
||||||
|
phy_free_RU(RC.ru[inst]);
|
||||||
|
}
|
||||||
free_lte_top();
|
free_lte_top();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user