kalloc and kfree interface and abstraction
[cortex-from-scratch] / include / lib / pool.h
1 /* Fixed size memory pool allocation  */
2 typedef struct mem_pool mem_pool_t;
3
4 struct mem_pool {
5
6         unsigned short blocks; 
7         unsigned short block_size; 
8         unsigned short free_blocks;
9         unsigned short blocks_init; 
10         unsigned char * SRAM_entry;
11         unsigned char * m_next; 
12
13 };
14
15 void pool_init(mem_pool_t *, size_t size_arg, unsigned int blocks_arg, unsigned char * entry_SRAM); 
16 void * alloc(void * s);
17 void free(void * s, void* p); 
18 void heap_info(void * s);