Merge remote-tracking branch 'origin/develop' into feature-127-protocol-split

This commit is contained in:
Calvin HSU
2018-08-28 12:22:59 +02:00
684 changed files with 249764 additions and 778731 deletions
+3 -3
View File
@@ -275,9 +275,9 @@ get_free_mem_block (uint32_t sizeP, const char* caller)
} while (pool_selected++ < 12);
LOG_E(PHY, "[MEM_MNGT][ERROR][FATAL] failed allocating MEM_BLOCK size %d byes (pool_selected=%d size=%d)\n", sizeP, pool_selected, size);
display_mem_load();
AssertFatal(1==0,"get_free_mem_block failed");
// display_mem_load();
// AssertFatal(1==0,"get_free_mem_block failed");
LOG_E(MAC,"[MEM_MNGT][ERROR][FATAL] get_free_mem_block failed!!!\n");
#ifdef MEMBLOCK_BIG_LOCK
if (pthread_mutex_unlock(&mtex)) abort();
#endif
+31 -21
View File
@@ -32,13 +32,7 @@
# define __MEM_BLOCK_H__
#include <stdint.h>
#ifdef MEM_BLOCK_C
# define public_mem_block(x) x
# define private_mem_block(x) x
#else
# define public_mem_block(x) extern x
# define private_mem_block(x)
#endif
#include "openair2/COMMON/platform_constants.h"
//-----------------------------------------------------------------------------
typedef struct mem_block_t {
@@ -47,21 +41,20 @@ typedef struct mem_block_t {
unsigned char pool_id;
unsigned char *data;
} mem_block_t;
#include "UTIL/LISTS/list.h"
//-----------------------------------------------------------------------------
public_mem_block(void *pool_buffer_init (void);)
public_mem_block(void *pool_buffer_clean (void *arg);)
public_mem_block(void free_mem_block (mem_block_t * leP, const char* caller);)
public_mem_block(mem_block_t* get_free_mem_block (uint32_t sizeP, const char* caller);)
public_mem_block(mem_block_t *get_free_copy_mem_block (void);)
public_mem_block(mem_block_t *get_free_copy_mem_block_up (void);)
public_mem_block(mem_block_t *copy_mem_block (mem_block_t * leP, mem_block_t * destP);)
public_mem_block(void display_mem_load (void);)
void *pool_buffer_init (void);
void *pool_buffer_clean (void *arg);
void free_mem_block (mem_block_t * leP, const char* caller);
mem_block_t* get_free_mem_block (uint32_t sizeP, const char* caller);
mem_block_t *get_free_copy_mem_block (void);
mem_block_t *get_free_copy_mem_block_up (void);
mem_block_t *copy_mem_block (mem_block_t * leP, mem_block_t * destP);
void display_mem_load (void);
public_mem_block(void check_mem_area (void);)
private_mem_block(void check_free_mem_block (mem_block_t * leP);)
void check_mem_area (void);
void check_free_mem_block (mem_block_t * leP);
# define MEM_SCALE MAX_MOBILES_PER_ENB
// definition of the size of the allocated memory area
# define MEM_MNGT_MB0_BLOCK_SIZE 64
@@ -141,9 +134,26 @@ private_mem_block(void check_free_mem_block (mem_block_t * leP);)
# define MEM_MNGT_NB_ELEMENTS 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 + MEM_MNGT_MB6_NB_BLOCKS + MEM_MNGT_MB7_NB_BLOCKS + MEM_MNGT_MB8_NB_BLOCKS + MEM_MNGT_MB9_NB_BLOCKS + MEM_MNGT_MB10_NB_BLOCKS + MEM_MNGT_MB11_NB_BLOCKS + MEM_MNGT_MB12_NB_BLOCKS + MEM_MNGT_MBCOPY_NB_BLOCKS
# define MEM_MNGT_POOL_ID_COPY 13
#define LIST_NAME_MAX_CHAR 32
private_mem_block(typedef struct {
typedef struct {
struct mem_block_t *head;
struct mem_block_t *tail;
int nb_elements;
char name[LIST_NAME_MAX_CHAR];
} list2_t;
//-----------------------------------------------------------------------------
typedef struct {
struct mem_block_t *head;
struct mem_block_t *tail;
int nb_elements;
char name[LIST_NAME_MAX_CHAR];
} list_t;
typedef struct {
//-----------------------------------------------------------
// basic memory management
//-----------------------------------------------------------
@@ -163,9 +173,9 @@ private_mem_block(typedef struct {
mem_block_t mem_blocks[MEM_MNGT_NB_ELEMENTS];
list_t mem_lists[14];
} mem_pool;)
} mem_pool;
private_mem_block(mem_pool mem_block_var;)
mem_pool mem_block_var;
#endif