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
canghaiwuhen
OpenXG-RAN
Commits
9548ab86
Commit
9548ab86
authored
Jan 08, 2019
by
Sebastian Wagner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in memory allocation
parent
97278014
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_init_mem.h
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_init_mem.h
+10
-13
No files found.
openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_init_mem.h
View file @
9548ab86
...
@@ -57,21 +57,16 @@ static inline void* malloc32_clear(size_t size)
...
@@ -57,21 +57,16 @@ static inline void* malloc32_clear(size_t size)
*/
*/
static
inline
t_nrLDPC_procBuf
*
nrLDPC_init_mem
(
void
)
static
inline
t_nrLDPC_procBuf
*
nrLDPC_init_mem
(
void
)
{
{
t_nrLDPC_procBuf
procBuf
;
t_nrLDPC_procBuf
*
p_procBuf
=
(
t_nrLDPC_procBuf
*
)
malloc32_clear
(
sizeof
(
t_nrLDPC_procBuf
));
t_nrLDPC_procBuf
*
p_procBuf
=
&
procBuf
;
if
(
p_procBuf
)
{
p_procBuf
->
cnProcBuf
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_SIZE_CN_PROC_BUF
*
sizeof
(
int8_t
));
p_procBuf
->
cnProcBuf
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_SIZE_CN_PROC_BUF
*
sizeof
(
int8_t
));
p_procBuf
->
cnProcBufRes
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_SIZE_CN_PROC_BUF
*
sizeof
(
int8_t
));
p_procBuf
->
cnProcBufRes
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_SIZE_CN_PROC_BUF
*
sizeof
(
int8_t
));
p_procBuf
->
bnProcBuf
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_SIZE_BN_PROC_BUF
*
sizeof
(
int8_t
));
p_procBuf
->
bnProcBuf
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_SIZE_BN_PROC_BUF
*
sizeof
(
int8_t
));
p_procBuf
->
bnProcBufRes
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_SIZE_BN_PROC_BUF
*
sizeof
(
int8_t
));
p_procBuf
->
bnProcBufRes
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_SIZE_BN_PROC_BUF
*
sizeof
(
int8_t
));
p_procBuf
->
llrRes
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_MAX_NUM_LLR
*
sizeof
(
int8_t
));
p_procBuf
->
llrRes
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_MAX_NUM_LLR
*
sizeof
(
int8_t
));
p_procBuf
->
llrProcBuf
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_MAX_NUM_LLR
*
sizeof
(
int8_t
));
p_procBuf
->
llrProcBuf
=
(
int8_t
*
)
malloc32_clear
(
NR_LDPC_MAX_NUM_LLR
*
sizeof
(
int8_t
));
int
i
;
for
(
i
=
0
;
i
<
10
;
i
++
)
{
printf
(
"p_procBuf->cnProcBuf[%d] = %d
\n
"
,
i
,
p_procBuf
->
cnProcBuf
[
i
]);
printf
(
"p_procBuf->cnProcBuf[%d] = %d
\n
"
,
NR_LDPC_SIZE_CN_PROC_BUF
-
i
-
1
,
p_procBuf
->
cnProcBuf
[
NR_LDPC_SIZE_CN_PROC_BUF
-
i
-
1
]);
}
}
return
(
p_procBuf
);
return
(
p_procBuf
);
...
@@ -85,5 +80,7 @@ static inline void nrLDPC_free_mem(t_nrLDPC_procBuf* p_procBuf)
...
@@ -85,5 +80,7 @@ static inline void nrLDPC_free_mem(t_nrLDPC_procBuf* p_procBuf)
free
(
p_procBuf
->
bnProcBufRes
);
free
(
p_procBuf
->
bnProcBufRes
);
free
(
p_procBuf
->
llrRes
);
free
(
p_procBuf
->
llrRes
);
free
(
p_procBuf
->
llrProcBuf
);
free
(
p_procBuf
->
llrProcBuf
);
free
(
p_procBuf
);
}
}
#endif
#endif
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