Commit 090fcc5a authored by Thomas Laurent's avatar Thomas Laurent

move mem_block to heap

parent 798c37aa
Pipeline #10745 failed with stage
in 0 seconds
......@@ -61,6 +61,7 @@ uint32_t counters[14] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
/*
* initialize all ures
*/
extern mem_pool *memBlockVar;
void *
pool_buffer_init (void)
{
......@@ -68,6 +69,7 @@ pool_buffer_init (void)
uint32_t index, mb_index, pool_index;
mem_pool *memory = (mem_pool *) &mem_block_var;
memBlockVar=malloc(sizeof(mem_pool));
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_MB4_NB_BLOCKS, MEM_MNGT_MB5_NB_BLOCKS,
......
......@@ -178,7 +178,8 @@ typedef struct {
} mem_pool;
mem_pool mem_block_var;
mem_pool *memBlockVar;
#define mem_block_var (*memBlockVar)
#ifdef __cplusplus
}
......
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