Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
d406eb03
Commit
d406eb03
authored
Aug 22, 2023
by
mir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Free the task_manager to avoid memory leak.
parent
3597ac63
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
common/utils/thread_pool/task_manager.c
common/utils/thread_pool/task_manager.c
+1
-0
common/utils/thread_pool/task_manager.h
common/utils/thread_pool/task_manager.h
+1
-1
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+7
-1
No files found.
common/utils/thread_pool/task_manager.c
View file @
d406eb03
...
...
@@ -538,6 +538,7 @@ void free_task_manager(task_manager_t* man, void (*clean)(task_t*))
void
async_task_manager
(
task_manager_t
*
man
,
task_t
t
)
{
assert
(
man
!=
NULL
);
assert
(
man
->
len_thr
>
0
);
assert
(
t
.
func
!=
NULL
);
//assert(t.args != NULL);
...
...
common/utils/thread_pool/task_manager.h
View file @
d406eb03
...
...
@@ -10,7 +10,7 @@
#define TASK_MANAGER_UE
#define TASK_MANAGER_UE_DECODING
//
#define TASK_MANAGER_SIM
#define TASK_MANAGER_SIM
#include "task.h"
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
d406eb03
...
...
@@ -419,7 +419,7 @@ int main(int argc, char **argv)
#ifdef TASK_MANAGER
int
const
log_cores
=
get_nprocs_conf
();
assert
(
log_cores
>
0
);
init_task_manager
(
&
gNB
->
man
,
log_cores
);
init_task_manager
(
&
gNB
->
man
,
log_cores
/
2
);
#else
initTpool
(
"n"
,
&
gNB
->
threadPool
,
true
);
#endif
...
...
@@ -656,6 +656,11 @@ int main(int argc, char **argv)
free
(
gNB
->
gNB_config
.
tdd_table
.
max_tdd_periodicity_list
[
i
].
max_num_of_symbol_per_slot_list
);
free
(
gNB
->
gNB_config
.
tdd_table
.
max_tdd_periodicity_list
);
#ifdef TASK_MANAGER
void
(
*
clean
)(
task_t
*
args
)
=
NULL
;
free_task_manager
(
&
gNB
->
man
,
clean
);
#endif
term_nr_ue_signal
(
UE
,
1
);
free
(
UE
);
...
...
@@ -674,6 +679,7 @@ int main(int argc, char **argv)
loader_reset
();
logTerm
();
return
(
n_errors
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment