mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-02 12:52:10 +00:00
fixed bug #36412: memp.c does not compile when MEMP_OVERFLOW_CHECK > zero and MEMP_SEPARATE_POOLS == 1
This commit is contained in:
parent
fe9c716fbe
commit
b56a1501d2
@ -80,8 +80,12 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2012-05-11: Simon Goldschmidt (patch by Marty)
|
||||||
|
* memp.c: fixed bug #36412: memp.c does not compile when
|
||||||
|
MEMP_OVERFLOW_CHECK > zero and MEMP_SEPARATE_POOLS == 1
|
||||||
|
|
||||||
2012-05-08: Simon Goldschmidt
|
2012-05-08: Simon Goldschmidt
|
||||||
* tcp_out.c: fixed bug: #36380 unsent_oversize mismatch in 1.4.1RC1 (this was
|
* tcp_out.c: fixed bug #36380: unsent_oversize mismatch in 1.4.1RC1 (this was
|
||||||
a debug-check issue only)
|
a debug-check issue only)
|
||||||
|
|
||||||
2012-05-03: Simon Goldschmidt (patch by Sylvain Rochet)
|
2012-05-03: Simon Goldschmidt (patch by Sylvain Rochet)
|
||||||
|
@ -285,17 +285,25 @@ memp_overflow_check_all(void)
|
|||||||
u16_t i, j;
|
u16_t i, j;
|
||||||
struct memp *p;
|
struct memp *p;
|
||||||
|
|
||||||
|
#if !MEMP_SEPARATE_POOLS
|
||||||
p = (struct memp *)LWIP_MEM_ALIGN(memp_memory);
|
p = (struct memp *)LWIP_MEM_ALIGN(memp_memory);
|
||||||
|
#endif /* !MEMP_SEPARATE_POOLS */
|
||||||
for (i = 0; i < MEMP_MAX; ++i) {
|
for (i = 0; i < MEMP_MAX; ++i) {
|
||||||
p = p;
|
#if MEMP_SEPARATE_POOLS
|
||||||
|
p = (struct memp *)(memp_bases[i]);
|
||||||
|
#endif /* MEMP_SEPARATE_POOLS */
|
||||||
for (j = 0; j < memp_num[i]; ++j) {
|
for (j = 0; j < memp_num[i]; ++j) {
|
||||||
memp_overflow_check_element_overflow(p, i);
|
memp_overflow_check_element_overflow(p, i);
|
||||||
p = (struct memp*)((u8_t*)p + MEMP_SIZE + memp_sizes[i] + MEMP_SANITY_REGION_AFTER_ALIGNED);
|
p = (struct memp*)((u8_t*)p + MEMP_SIZE + memp_sizes[i] + MEMP_SANITY_REGION_AFTER_ALIGNED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if !MEMP_SEPARATE_POOLS
|
||||||
p = (struct memp *)LWIP_MEM_ALIGN(memp_memory);
|
p = (struct memp *)LWIP_MEM_ALIGN(memp_memory);
|
||||||
|
#endif /* !MEMP_SEPARATE_POOLS */
|
||||||
for (i = 0; i < MEMP_MAX; ++i) {
|
for (i = 0; i < MEMP_MAX; ++i) {
|
||||||
p = p;
|
#if MEMP_SEPARATE_POOLS
|
||||||
|
p = (struct memp *)(memp_bases[i]);
|
||||||
|
#endif /* MEMP_SEPARATE_POOLS */
|
||||||
for (j = 0; j < memp_num[i]; ++j) {
|
for (j = 0; j < memp_num[i]; ++j) {
|
||||||
memp_overflow_check_element_underflow(p, i);
|
memp_overflow_check_element_underflow(p, i);
|
||||||
p = (struct memp*)((u8_t*)p + MEMP_SIZE + memp_sizes[i] + MEMP_SANITY_REGION_AFTER_ALIGNED);
|
p = (struct memp*)((u8_t*)p + MEMP_SIZE + memp_sizes[i] + MEMP_SANITY_REGION_AFTER_ALIGNED);
|
||||||
@ -313,9 +321,13 @@ memp_overflow_init(void)
|
|||||||
struct memp *p;
|
struct memp *p;
|
||||||
u8_t *m;
|
u8_t *m;
|
||||||
|
|
||||||
|
#if !MEMP_SEPARATE_POOLS
|
||||||
p = (struct memp *)LWIP_MEM_ALIGN(memp_memory);
|
p = (struct memp *)LWIP_MEM_ALIGN(memp_memory);
|
||||||
|
#endif /* !MEMP_SEPARATE_POOLS */
|
||||||
for (i = 0; i < MEMP_MAX; ++i) {
|
for (i = 0; i < MEMP_MAX; ++i) {
|
||||||
p = p;
|
#if MEMP_SEPARATE_POOLS
|
||||||
|
p = (struct memp *)(memp_bases[i]);
|
||||||
|
#endif /* MEMP_SEPARATE_POOLS */
|
||||||
for (j = 0; j < memp_num[i]; ++j) {
|
for (j = 0; j < memp_num[i]; ++j) {
|
||||||
#if MEMP_SANITY_REGION_BEFORE_ALIGNED > 0
|
#if MEMP_SANITY_REGION_BEFORE_ALIGNED > 0
|
||||||
m = (u8_t*)p + MEMP_SIZE - MEMP_SANITY_REGION_BEFORE_ALIGNED;
|
m = (u8_t*)p + MEMP_SIZE - MEMP_SANITY_REGION_BEFORE_ALIGNED;
|
||||||
|
Loading…
Reference in New Issue
Block a user