Introducing mem_cpointer_t type for compressed pointers.

This commit is contained in:
Ruben Ayrapetyan
2015-04-01 16:47:19 +03:00
parent 3da56908aa
commit c81651dbe9
9 changed files with 46 additions and 35 deletions
+5
View File
@@ -28,6 +28,11 @@
#include "mem-heap.h"
#include "mem-poolman.h"
/**
* Compressed pointer
*/
typedef uint16_t mem_cpointer_t;
/**
* Representation of NULL value for compressed pointers
*/
+1 -1
View File
@@ -65,7 +65,7 @@ typedef struct __attribute__ ((aligned (MEM_ALIGNMENT))) mem_pool_state_t
unsigned int free_chunks_number : MEM_POOL_MAX_CHUNKS_NUMBER_LOG;
/** Pointer to the next pool with same chunk size */
unsigned int next_pool_cp : MEM_COMPRESSED_POINTER_WIDTH;
mem_cpointer_t next_pool_cp : MEM_COMPRESSED_POINTER_WIDTH;
} mem_pool_state_t;
extern void mem_pool_init (mem_pool_state_t *pool_p, size_t pool_size);