lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Re: PBUF Leak Problems...


From: Kieran Mansley
Subject: Re: [lwip-users] Re: PBUF Leak Problems...
Date: Fri, 21 Sep 2007 13:55:46 +0100

On Fri, 2007-09-21 at 08:40 -0400, Thomas Catalino wrote:

> A better solution might be to have sys_mbox_post return a status which
> can be used by the caller to prevent such a resource leak (I would
> think sys_mbox_post can't do it since it's unaware of what type of
> resource is being put in the mailbox). The caller could do something
> more intelligent with the knowledge of a failure, free the resource,
> set an error code that filters back to the user, increment a stat that
> indicates data loss, there are a bunch of possibilities. 

I'd be happy for the failure of sys_mbox_post to be recorded, e.g.
through a stat increment, or a debug message, or even assertion, as this
will make it much more obvious to people like you who see this problem
what is going wrong.  However, as Frederic has pointed out, in most
cases there is little we can do to sensibly recover from the failure
without writing a lot of code, and so this is where we have to carefully
consider whether the tradeoff is worth it when you take into account
lwIP's main goal of being lightweight.

Kieran 





reply via email to

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