mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-04 05:39:53 +00:00
Ooops, checked in the wrong version before :-(
This commit is contained in:
parent
6f4056cf99
commit
ab4993fda2
@ -60,13 +60,16 @@ struct mem {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* All allocated blocks will be MIN_SIZE bytes big, at least! */
|
/* All allocated blocks will be MIN_SIZE bytes big, at least! */
|
||||||
#define MIN_SIZE MEM_ALIGN_SIZE(12)
|
#ifndef MIN_SIZE
|
||||||
|
#define MIN_SIZE 12
|
||||||
|
#endif /* MIN_SIZE */
|
||||||
|
#define MIN_SIZE_ALIGNED MEM_ALIGN_SIZE(MIN_SIZE)
|
||||||
#define SIZEOF_STRUCT_MEM MEM_ALIGN_SIZE(sizeof(struct mem))
|
#define SIZEOF_STRUCT_MEM MEM_ALIGN_SIZE(sizeof(struct mem))
|
||||||
#define MEM_SIZE_ALIGNED MEM_ALIGN_SIZE(MEM_SIZE)
|
#define MEM_SIZE_ALIGNED MEM_ALIGN_SIZE(MEM_SIZE)
|
||||||
|
|
||||||
static struct mem *ram_end;
|
static struct mem *ram_end;
|
||||||
/* the heap. we need one struct mem at the end and some room for alignment */
|
/* the heap. we need one struct mem at the end and some room for alignment */
|
||||||
static u8_t ram_heap[MEM_SIZE_ALIGNED + SIZEOF_STRUCT_MEM + MEM_ALIGNMENT];
|
static u8_t ram_heap[MEM_SIZE_ALIGNED + (2*SIZEOF_STRUCT_MEM) + MEM_ALIGNMENT];
|
||||||
static u8_t *ram; /* for alignment, ram is now a pointer instead of an array */
|
static u8_t *ram; /* for alignment, ram is now a pointer instead of an array */
|
||||||
static struct mem *lfree; /* pointer to the lowest free block */
|
static struct mem *lfree; /* pointer to the lowest free block */
|
||||||
static sys_sem_t mem_sem; /* concurrent access protection */
|
static sys_sem_t mem_sem; /* concurrent access protection */
|
||||||
|
Loading…
Reference in New Issue
Block a user