lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] PBUFS + LWIP 1.3.0 + memory allocation


From: Kieran Mansley
Subject: RE: [lwip-users] PBUFS + LWIP 1.3.0 + memory allocation
Date: Thu, 11 Feb 2010 12:18:36 +0000

On Wed, 2010-02-10 at 13:24 -0500, Bill Auerbach wrote:
> 
> Worse is that every inclusion of pbuf.h that didn't define mem_realloc
> will
> cause this function to be defined.  Since it returns an argument,
> there will
> be compilers that generate code and create multiple copies of this
> function.
> It's small but still wasteful.  I believe function definitions are not
> appropriate in H files because you don't know how they will be
> handled.

In the case of lwIP where we can't rely on the compiler supporting
inline I agree.  functions defined in .h files should be avoided in
lwIP.

Kieran





reply via email to

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