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
d7515686
Commit
d7515686
authored
Jan 12, 2022
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a bug in call to realloc inside a function
parent
d108d9c6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
24 deletions
+30
-24
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+1
-0
openair1/PHY/LTE_UE_TRANSPORT/pcfich_ue.c
openair1/PHY/LTE_UE_TRANSPORT/pcfich_ue.c
+1
-1
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+6
-6
openair1/SIMULATION/LTE_PHY/mbmssim.c
openair1/SIMULATION/LTE_PHY/mbmssim.c
+6
-6
openair1/SIMULATION/LTE_PHY/ulsim.c
openair1/SIMULATION/LTE_PHY/ulsim.c
+9
-9
openair2/UTIL/LISTS/list.h
openair2/UTIL/LISTS/list.h
+7
-2
No files found.
openair1/PHY/INIT/nr_init_ue.c
View file @
d7515686
...
...
@@ -41,6 +41,7 @@
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include <openair1/PHY/MODULATION/nr_modulation.h>
#if 0
void phy_config_harq_ue(module_id_t Mod_id,
...
...
openair1/PHY/LTE_UE_TRANSPORT/pcfich_ue.c
View file @
d7515686
...
...
@@ -46,7 +46,7 @@ void pcfich_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
uint32_t
i
;
uint8_t
reset
;
uint32_t
x1
,
x2
,
s
=
0
;
uint32_t
x1
=
0
,
x2
=
0
,
s
=
0
;
reset
=
1
;
// x1 is set in lte_gold_generic
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
d7515686
...
...
@@ -1826,12 +1826,12 @@ int main(int argc, char **argv) {
if
(
t_rx
>
2000
)
n_rx_dropped
++
;
appendVarArray
(
table_tx
,
&
t_tx
);
appendVarArray
(
table_tx_ifft
,
&
t_tx_ifft
);
appendVarArray
(
table_rx
,
&
t_rx
);
appendVarArray
(
table_rx_fft
,
&
t_rx_fft
);
appendVarArray
(
table_rx_demod
,
&
t_rx_demod
);
appendVarArray
(
table_rx_dec
,
&
t_rx_dec
);
appendVarArray
(
&
table_tx
,
&
t_tx
);
appendVarArray
(
&
table_tx_ifft
,
&
t_tx_ifft
);
appendVarArray
(
&
table_rx
,
&
t_rx
);
appendVarArray
(
&
table_rx_fft
,
&
t_rx_fft
);
appendVarArray
(
&
table_rx_demod
,
&
t_rx_demod
);
appendVarArray
(
&
table_rx_dec
,
&
t_rx_dec
);
}
//trials
// round_trials[0]: number of code word : goodput the protocol
...
...
openair1/SIMULATION/LTE_PHY/mbmssim.c
View file @
d7515686
...
...
@@ -1971,12 +1971,12 @@ int main(int argc, char **argv) {
if
(
t_rx
>
2000
)
n_rx_dropped
++
;
appendVarArray
(
table_tx
,
&
t_tx
);
appendVarArray
(
table_tx_ifft
,
&
t_tx_ifft
);
appendVarArray
(
table_rx
,
&
t_rx
);
appendVarArray
(
table_rx_fft
,
&
t_rx_fft
);
appendVarArray
(
table_rx_demod
,
&
t_rx_demod
);
appendVarArray
(
table_rx_dec
,
&
t_rx_dec
);
appendVarArray
(
&
table_tx
,
&
t_tx
);
appendVarArray
(
&
table_tx_ifft
,
&
t_tx_ifft
);
appendVarArray
(
&
table_rx
,
&
t_rx
);
appendVarArray
(
&
table_rx_fft
,
&
t_rx_fft
);
appendVarArray
(
&
table_rx_demod
,
&
t_rx_demod
);
appendVarArray
(
&
table_rx_dec
,
&
t_rx_dec
);
}
//trials
// round_trials[0]: number of code word : goodput the protocol
...
...
openair1/SIMULATION/LTE_PHY/ulsim.c
View file @
d7515686
...
...
@@ -743,7 +743,7 @@ int main(int argc, char **argv) {
UE2eNB
->
max_Doppler
=
maxDoppler
;
// NN: N_RB_UL has to be defined in ulsim
for
(
int
k
=
0
;
k
<
NUMBER_OF_U
E
_MAX
;
k
++
)
eNB
->
ulsch
[
k
]
=
new_eNB_ulsch
(
max_turbo_iterations
,
N_RB_DL
,
0
);
for
(
int
k
=
0
;
k
<
NUMBER_OF_U
LSCH
_MAX
;
k
++
)
eNB
->
ulsch
[
k
]
=
new_eNB_ulsch
(
max_turbo_iterations
,
N_RB_DL
,
0
);
UE
->
ulsch
[
0
]
=
new_ue_ulsch
(
N_RB_DL
,
0
);
printf
(
"ULSCH %p
\n
"
,
UE
->
ulsch
[
0
]);
...
...
@@ -1279,14 +1279,14 @@ int main(int argc, char **argv) {
n_rx_dropped
++
;
if
(
trials
<
1000
)
{
appendVarArray
(
table_tx
,
&
t_tx
);
appendVarArray
(
table_tx_ifft
,
&
t_tx_ifft
);
appendVarArray
(
table_tx_mod
,
&
t_tx_mod
);
appendVarArray
(
table_tx_enc
,
&
t_tx_enc
);
appendVarArray
(
table_rx
,
&
t_rx
);
appendVarArray
(
table_rx_fft
,
&
t_rx_fft
);
appendVarArray
(
table_rx_demod
,
&
t_rx_demod
);
appendVarArray
(
table_rx_dec
,
&
t_rx_dec
);
appendVarArray
(
&
table_tx
,
&
t_tx
);
appendVarArray
(
&
table_tx_ifft
,
&
t_tx_ifft
);
appendVarArray
(
&
table_tx_mod
,
&
t_tx_mod
);
appendVarArray
(
&
table_tx_enc
,
&
t_tx_enc
);
appendVarArray
(
&
table_rx
,
&
t_rx
);
appendVarArray
(
&
table_rx_fft
,
&
t_rx_fft
);
appendVarArray
(
&
table_rx_demod
,
&
t_rx_demod
);
appendVarArray
(
&
table_rx_dec
,
&
t_rx_dec
);
}
}
//trials
...
...
openair2/UTIL/LISTS/list.h
View file @
d7515686
...
...
@@ -48,6 +48,8 @@
#include "UTIL/MEM/mem_block.h"
#include <common/utils/assertions.h>
//-----------------------------------------------------------------------------
void
list_init
(
list_t
*
,
char
*
);
...
...
@@ -126,10 +128,13 @@ static inline void * dataArray(varArray_t * input) {
return
input
+
1
;
}
static
inline
void
appendVarArray
(
varArray_t
*
input
,
void
*
data
)
{
static
inline
void
appendVarArray
(
varArray_t
**
inputPtr
,
void
*
data
)
{
varArray_t
*
input
=*
inputPtr
;
if
(
input
->
size
>=
input
->
mallocedSize
)
{
input
->
mallocedSize
+=
input
->
increment
;
input
=
(
varArray_t
*
)
realloc
(
input
,
sizeof
(
varArray_t
)
+
input
->
mallocedSize
*
input
->
atomSize
);
*
inputPtr
=
(
varArray_t
*
)
realloc
(
input
,
sizeof
(
varArray_t
)
+
input
->
mallocedSize
*
input
->
atomSize
);
AssertFatal
(
*
inputPtr
,
"no memory left"
);
input
=*
inputPtr
;
}
memcpy
((
uint8_t
*
)(
input
+
1
)
+
input
->
atomSize
*
input
->
size
++
,
data
,
input
->
atomSize
);
}
...
...
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