lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Query amount of free buffers


From: address@hidden
Subject: Re: [lwip-users] Query amount of free buffers
Date: Thu, 25 Mar 2010 18:43:53 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

Marco Jakobs wrote:
OK ... good to know. :-) But i see no advantage to rewrite it from the
netconn API to the socket API, as everything works fine
No, just wantet to make this clear for anyone having to decide between the 2 APIs.
So the calculation of TCP_SND_QUEULEN will result in 8. Does this mean
that TCP may use 8 out of 16 (MEMP_NUM_PBUF) buffers?
Not really. TCP_SND_QUEUELEN == 8 says that at maximum, 8 pbufs will be queued for sending per TCP pcb. However, (up to CVS HEAD) every call to netconn_write creates 1 pbuf (PBUF_RAM when telling the stack to copy the data) or 2 pbufs (one PBUF_RAM and one PBUF_REF, when not telling the stack to copy the data) at minimum. Only the PBUF_REF pbufs come from the pool specified by MEMP_NUM_PBUF. The PBUF_RAM pbufs are allocated on the heap, the size of which is defined by MEM_SIZE.

Simon




reply via email to

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