mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-11 15:40:05 +00:00
Ensure the size of each pbuf in the pool meets alignment constraints
This commit is contained in:
parent
75beb3bd35
commit
f4f2bfe379
@ -102,6 +102,9 @@ pbuf_init(void)
|
|||||||
|
|
||||||
pbuf_pool = (struct pbuf *)MEM_ALIGN(pbuf_pool_memory);
|
pbuf_pool = (struct pbuf *)MEM_ALIGN(pbuf_pool_memory);
|
||||||
|
|
||||||
|
LWIP_ASSERT("pbuf_init: PBUF_POOL_BUFSIZE not aligned",
|
||||||
|
(PBUF_POOL_BUFSIZE % MEM_ALIGNMENT) == 0);
|
||||||
|
|
||||||
#if PBUF_STATS
|
#if PBUF_STATS
|
||||||
lwip_stats.pbuf.avail = PBUF_POOL_SIZE;
|
lwip_stats.pbuf.avail = PBUF_POOL_SIZE;
|
||||||
#endif /* PBUF_STATS */
|
#endif /* PBUF_STATS */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user