Commit da40f4e1 authored by Haruki NAOI's avatar Haruki NAOI

fix: get_free_mem_block uses heap memory (not mem_block).

parent b832a227
...@@ -988,7 +988,7 @@ set(UTIL_SRC ...@@ -988,7 +988,7 @@ set(UTIL_SRC
${OPENAIR_DIR}/common/utils/LOG/log.c ${OPENAIR_DIR}/common/utils/LOG/log.c
# ${OPENAIR2_DIR}/UTIL/LOG/vcd_signal_dumper.c # ${OPENAIR2_DIR}/UTIL/LOG/vcd_signal_dumper.c
${OPENAIR2_DIR}/UTIL/MATH/oml.c ${OPENAIR2_DIR}/UTIL/MATH/oml.c
#${OPENAIR2_DIR}/UTIL/MEM/mem_block.c ${OPENAIR2_DIR}/UTIL/MEM/mem_block.c
# ${OPENAIR2_DIR}/UTIL/OCG/OCG.c # ${OPENAIR2_DIR}/UTIL/OCG/OCG.c
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_create_dir.c # ${OPENAIR2_DIR}/UTIL/OCG/OCG_create_dir.c
# ${OPENAIR2_DIR}/UTIL/OCG/OCG_detect_file.c # ${OPENAIR2_DIR}/UTIL/OCG/OCG_detect_file.c
......
...@@ -35,6 +35,7 @@ int timer_expired(int fd); ...@@ -35,6 +35,7 @@ int timer_expired(int fd);
task_list_t tasks[TASK_MAX]; task_list_t tasks[TASK_MAX];
extern "C" { extern "C" {
#if 0
void *pool_buffer_init (void) { void *pool_buffer_init (void) {
return 0; return 0;
} }
...@@ -63,7 +64,7 @@ extern "C" { ...@@ -63,7 +64,7 @@ extern "C" {
ptr->size=sizeP; ptr->size=sizeP;
return ptr; return ptr;
} }
#endif
void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size) { void *itti_malloc(task_id_t origin_task_id, task_id_t destination_task_id, ssize_t size) {
void *ptr = NULL; void *ptr = NULL;
AssertFatal ((ptr=malloc (size)) != NULL, "Memory allocation of %zu bytes failed (%d -> %d)!\n", AssertFatal ((ptr=malloc (size)) != NULL, "Memory allocation of %zu bytes failed (%d -> %d)!\n",
......
...@@ -68,8 +68,8 @@ pool_buffer_init (void) ...@@ -68,8 +68,8 @@ pool_buffer_init (void)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
uint32_t index, mb_index, pool_index; uint32_t index, mb_index, pool_index;
mem_pool *memory = (mem_pool *) &mem_block_var;
memBlockVar=malloc(sizeof(mem_pool)); memBlockVar=malloc(sizeof(mem_pool));
mem_pool *memory = (mem_pool *) &mem_block_var;
int pool_sizes[14] = { MEM_MNGT_MB0_NB_BLOCKS, MEM_MNGT_MB1_NB_BLOCKS, int pool_sizes[14] = { MEM_MNGT_MB0_NB_BLOCKS, MEM_MNGT_MB1_NB_BLOCKS,
MEM_MNGT_MB2_NB_BLOCKS, MEM_MNGT_MB3_NB_BLOCKS, MEM_MNGT_MB2_NB_BLOCKS, MEM_MNGT_MB3_NB_BLOCKS,
MEM_MNGT_MB4_NB_BLOCKS, MEM_MNGT_MB5_NB_BLOCKS, MEM_MNGT_MB4_NB_BLOCKS, MEM_MNGT_MB5_NB_BLOCKS,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment