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: Kieran Mansley
Subject: Re: [lwip-users] Query amount of free buffers
Date: Sat, 20 Mar 2010 21:00:49 +0000

On 20 Mar 2010, at 19:36, Marco Jakobs wrote:

> To realize this, i need some runtime information on the LwIP memory usage 
> like "total buffers / used buffers" or "total memory / used memory" - with 
> which my TCP tasks like telnet would not send any data in case of low memory. 
> This would prevent system stability and - most important - not affect the 
> local UDP protocol traffic on the ethernet. Telnet may wait or even drop, but 
> not the whole system.

Could you not just use a non-blocking write call, and try again later if it 
would block as this would mean that the buffers were probably all in use.

You can either set the netconn to be non-blocking by default, or add 
NETCONN_DONTBLOCK to the API flags when you call netconn_write (I think).

Kieran



reply via email to

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