Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
d298b4fe
Commit
d298b4fe
authored
Feb 13, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory leaks in nr_ulschsim
parent
1f2dfd5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
25 deletions
+23
-25
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+23
-25
No files found.
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
d298b4fe
...
...
@@ -454,32 +454,23 @@ int main(int argc, char **argv)
rel15_ul
->
pusch_data
.
tb_size
=
TBS
/
8
;
///////////////////////////////////////////////////
double
*
modulated_input
=
malloc16
(
sizeof
(
double
)
*
16
*
68
*
384
)
;
// [hna] 16 segments, 68*Zc
short
*
channel_output_fixed
=
malloc16
(
sizeof
(
short
)
*
16
*
68
*
384
)
;
short
*
channel_output_uncoded
=
malloc16
(
sizeof
(
unsigned
short
)
*
16
*
68
*
384
)
;
double
modulated_input
[
16
*
68
*
384
]
;
// [hna] 16 segments, 68*Zc
short
channel_output_fixed
[
16
*
68
*
384
]
;
short
channel_output_uncoded
[
16
*
68
*
384
]
;
unsigned
int
errors_bit_uncoded
=
0
;
unsigned
char
*
estimated_output_bit
;
unsigned
char
*
test_input_bit
;
unsigned
int
errors_bit
=
0
;
test_input_bit
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
16
*
68
*
384
);
estimated_output_bit
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
16
*
68
*
384
);
unsigned
char
*
test_input
;
test_input
=
(
unsigned
char
*
)
malloc16
(
sizeof
(
unsigned
char
)
*
TBS
/
8
);
for
(
i
=
0
;
i
<
TBS
/
8
;
i
++
)
test_input
[
i
]
=
(
unsigned
char
)
rand
();
unsigned
char
test_input_bit
[
16
*
68
*
384
];
unsigned
char
estimated_output_bit
[
16
*
68
*
384
];
/////////////////////////[adk] preparing UL harq_process parameters/////////////////////////
///////////
NR_UL_UE_HARQ_t
*
harq_process_ul_ue
=
ulsch_ue
->
harq_processes
[
harq_pid
];
DevAssert
(
harq_process_ul_ue
);
N_PRB_oh
=
0
;
// higher layer (RRC) parameter xOverhead in PUSCH-ServingCellConfig
N_RE_prime
=
NR_NB_SC_PER_RB
*
nb_symb_sch
-
nb_re_dmrs
-
N_PRB_oh
;
if
(
harq_process_ul_ue
)
{
harq_process_ul_ue
->
pusch_pdu
.
rnti
=
n_rnti
;
harq_process_ul_ue
->
pusch_pdu
.
mcs_index
=
Imcs
;
harq_process_ul_ue
->
pusch_pdu
.
nrOfLayers
=
Nl
;
...
...
@@ -488,12 +479,14 @@ int main(int argc, char **argv)
harq_process_ul_ue
->
num_of_mod_symbols
=
N_RE_prime
*
nb_rb
*
nb_codewords
;
harq_process_ul_ue
->
pusch_pdu
.
pusch_data
.
rv_index
=
rvidx
;
harq_process_ul_ue
->
pusch_pdu
.
pusch_data
.
tb_size
=
TBS
/
8
;
harq_process_ul_ue
->
a
=
&
test_input
[
0
]
;
unsigned
char
*
test_input
=
harq_process_ul_ue
->
a
;
}
///////////
////////////////////////////////////////////////////////////////////////////////////////////
for
(
i
=
0
;
i
<
TBS
/
8
;
i
++
)
test_input
[
i
]
=
(
unsigned
char
)
rand
();
#ifdef DEBUG_NR_ULSCHSIM
for
(
i
=
0
;
i
<
TBS
/
8
;
i
++
)
printf
(
"test_input[i]=%hhu
\n
"
,
test_input
[
i
]);
#endif
...
...
@@ -620,6 +613,11 @@ int main(int argc, char **argv)
printf
(
"
\n
"
);
}
for
(
sf
=
0
;
sf
<
2
;
sf
++
)
for
(
i
=
0
;
i
<
2
;
i
++
)
free_nr_ue_ulsch
(
&
UE
->
ulsch
[
sf
][
0
][
i
],
N_RB_UL
);
free_channel_desc_scm
(
gNB2UE
);
if
(
output_fd
)
fclose
(
output_fd
);
...
...
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