50 |
|
|
51 |
struct mem { |
struct mem { |
52 |
mem_size_t next, prev; |
mem_size_t next, prev; |
53 |
|
#if MEM_ALIGNMENT == 1 |
54 |
u8_t used; |
u8_t used; |
55 |
#if MEM_ALIGNMENT == 2 |
#elif MEM_ALIGNMENT == 2 |
56 |
u8_t dummy; |
u16_t used; |
57 |
#endif /* MEM_ALIGNEMNT == 2 */ |
#elif MEM_ALIGNMENT == 4 |
58 |
}; |
u32_t used; |
59 |
|
#else |
60 |
|
#error "unhandled MEM_ALIGNMENT size" |
61 |
|
#endif /* MEM_ALIGNMENT */ |
62 |
|
}; |
63 |
|
|
64 |
static struct mem *ram_end; |
static struct mem *ram_end; |
65 |
static u8_t ram[MEM_SIZE + sizeof(struct mem) + MEM_ALIGNMENT]; |
static u8_t ram[MEM_SIZE + sizeof(struct mem) + MEM_ALIGNMENT]; |