lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] [raw] configure lwip tcp tx pbuf


From: dworkdev
Subject: Re: [lwip-users] [raw] configure lwip tcp tx pbuf
Date: Thu, 2 Mar 2017 09:28:53 +0100

Thanks David and Simon for these informations. Seems more clear in my mind now.

I tried to provide more MEM_SIZE memory without success.

Finally I got my error, I wrote tcp_write instruction with pointer on a static memory. Removing the static solved my issue.


- #define PBUF_POOL_SIZE 256
- #define PBUF_POOL_BUFSIZE 1700
[..]
- The following line indicates me that the pbuf will be placed in RAM
tcp_pbuf_prealloc(layer, length, mx, os, pcb, api, fst) pbuf_alloc((layer), (length), PBUF_RAM)
Just to add to Simon's post: please be aware that PBUF_RAM allocations never draw from the PBUF POOL that you've defined above. If you want that to happen, define a custom pool instead, and (if relevant) avoid PBUF_POOL allocations in your own code. Otherwise you'll need a heap (ie MEM_SIZE). As far as I can tell, although I'd love to be corrected, there is no way to have a statically sized pool that is used for both PBUF_RAM and PBUF_POOL allocations.
David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]