mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-29 12:14:28 +00:00
memp: Fix memp_overflow_check_all failure
p needs to point to LWIP_MEM_ALIGN(memp_pools[i]->base) otherwise it will cause
assertion in overflow checking.
Fixes: c838e1ed5b
("Implement possibility to declare private memory pools")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
d4384cfac4
commit
1a7ba24d13
@ -205,7 +205,7 @@ memp_overflow_check_all(void)
|
|||||||
SYS_ARCH_PROTECT(old_level);
|
SYS_ARCH_PROTECT(old_level);
|
||||||
|
|
||||||
for (i = 0; i < MEMP_MAX; ++i) {
|
for (i = 0; i < MEMP_MAX; ++i) {
|
||||||
p = (struct memp *)(size_t)(memp_pools[i]->base);
|
p = (struct memp*)LWIP_MEM_ALIGN(memp_pools[i]->base);
|
||||||
for (j = 0; j < memp_pools[i]->num; ++j) {
|
for (j = 0; j < memp_pools[i]->num; ++j) {
|
||||||
memp_overflow_check_element_overflow(p, memp_pools[i]);
|
memp_overflow_check_element_overflow(p, memp_pools[i]);
|
||||||
memp_overflow_check_element_underflow(p, memp_pools[i]);
|
memp_overflow_check_element_underflow(p, memp_pools[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user