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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
548315ff
Commit
548315ff
authored
Mar 23, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix memory leaks after merge
parent
af0f4a08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+1
-2
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+5
-5
No files found.
openair1/PHY/INIT/nr_init.c
View file @
548315ff
...
...
@@ -331,10 +331,9 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
free_and_zero
(
pdcch_dmrs
);
uint32_t
****
pdsch_dmrs
=
gNB
->
nr_gold_pdsch_dmrs
;
int
nb_codewords
=
NR_MAX_NB_LAYERS
>
4
?
2
:
1
;
for
(
int
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
for
(
int
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
for
(
int
q
=
0
;
q
<
nb_codewords
;
q
++
)
for
(
int
q
=
0
;
q
<
NR_NB_NSCID
;
q
++
)
free_and_zero
(
pdsch_dmrs
[
slot
][
symb
][
q
]);
free_and_zero
(
pdsch_dmrs
[
slot
][
symb
]);
}
...
...
openair1/PHY/INIT/nr_init_ue.c
View file @
548315ff
...
...
@@ -216,7 +216,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
// ceil(((NB_RB*6(k)*2(QPSK)/32) // 3 RE *2(QPSK)
int
pusch_dmrs_init_length
=
((
fp
->
N_RB_UL
*
12
)
>>
5
)
+
1
;
ue
->
nr_gold_pusch_dmrs
=
(
uint32_t
****
)
malloc16
(
fp
->
slots_per_frame
*
sizeof
(
uint32_t
***
));
uint32_t
****
pusch_dmrs
=
ue
->
nr_gold_pusch_dmrs
;
...
...
@@ -230,7 +229,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
for
(
int
q
=
0
;
q
<
NR_NB_NSCID
;
q
++
)
{
pusch_dmrs
[
slot
][
symb
][
q
]
=
(
uint32_t
*
)
malloc16
(
pusch_dmrs_init_length
*
sizeof
(
uint32_t
));
AssertFatal
(
pusch_dmrs
[
slot
][
symb
][
q
]
!=
NULL
,
"init_nr_ue_signal: pusch_dmrs for slot %d symbol %d
codewor
d %d - malloc failed
\n
"
,
slot
,
symb
,
q
);
AssertFatal
(
pusch_dmrs
[
slot
][
symb
][
q
]
!=
NULL
,
"init_nr_ue_signal: pusch_dmrs for slot %d symbol %d
nsci
d %d - malloc failed
\n
"
,
slot
,
symb
,
q
);
}
}
}
...
...
@@ -314,7 +313,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
for
(
int
q
=
0
;
q
<
NR_NB_NSCID
;
q
++
)
{
pdsch_dmrs
[
slot
][
symb
][
q
]
=
(
uint32_t
*
)
malloc16
(
pdsch_dmrs_init_length
*
sizeof
(
uint32_t
));
AssertFatal
(
pdsch_dmrs
[
slot
][
symb
][
q
]
!=
NULL
,
"NR init: pdsch_dmrs for slot %d symbol %d
codewor
d %d - malloc failed
\n
"
,
slot
,
symb
,
q
);
AssertFatal
(
pdsch_dmrs
[
slot
][
symb
][
q
]
!=
NULL
,
"NR init: pdsch_dmrs for slot %d symbol %d
nsci
d %d - malloc failed
\n
"
,
slot
,
symb
,
q
);
}
}
}
...
...
@@ -478,6 +477,8 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
for
(
int
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
for
(
int
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
for
(
int
q
=
0
;
q
<
NR_NB_NSCID
;
q
++
)
free_and_zero
(
ue
->
nr_gold_pusch_dmrs
[
slot
][
symb
][
q
]);
free_and_zero
(
ue
->
nr_gold_pusch_dmrs
[
slot
][
symb
]);
}
free_and_zero
(
ue
->
nr_gold_pusch_dmrs
[
slot
]);
...
...
@@ -511,10 +512,9 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
}
free_and_zero
(
ue
->
nr_gold_pdcch
[
0
]);
int
nb_codewords
=
NR_MAX_NB_LAYERS
>
4
?
2
:
1
;
for
(
int
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
for
(
int
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
for
(
int
q
=
0
;
q
<
nb_codewords
;
q
++
)
for
(
int
q
=
0
;
q
<
NR_NB_NSCID
;
q
++
)
free_and_zero
(
ue
->
nr_gold_pdsch
[
0
][
slot
][
symb
][
q
]);
free_and_zero
(
ue
->
nr_gold_pdsch
[
0
][
slot
][
symb
]);
}
...
...
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