mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 21:14:09 +00:00
memp: Fix memp_overflow_check_element_overflow assertion
Use LWIP_MEM_ALIGN() in memp_overflow_init() to get alignment address for memp. This fixes assertion in memp_overflow_check_element_overflow when MEMP_OVERFLOW_CHECK is set. Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
ef31afb921
commit
e24fde05db
@ -215,7 +215,7 @@ memp_overflow_init(const struct memp_desc *desc)
|
||||
u16_t i;
|
||||
struct memp *p;
|
||||
|
||||
p = (struct memp *)(size_t)(desc->base);
|
||||
p = (struct memp*)LWIP_MEM_ALIGN(desc->base);
|
||||
for (i = 0; i < desc->num; ++i) {
|
||||
memp_overflow_init_element(p, desc);
|
||||
p = (struct memp*)(size_t)((u8_t*)p + MEMP_SIZE + desc->size + MEMP_SANITY_REGION_AFTER_ALIGNED);
|
||||
|
Loading…
Reference in New Issue
Block a user