lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] (no subject)


From: Leon Woestenberg
Subject: Re: [lwip-devel] (no subject)
Date: Fri, 19 Mar 2004 00:47:36 +0100
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

Hello Luke et al,


I think that this discussion at least has shown that the memory sub- system must be interchangeable, and as such we should really
concentrate on the API contract that we are going to follow so that
different people can plug-in their "best" memory allocator (or re-use
the existing one, if there is one available on the platform).

I would suggest using standard C names, with lwip_ prefix, such
as malloc() lwip_free(). The memory allocator should then implement
those functions.

address@hidden wrote:

On Thu, 18 Mar 2004, David Haas wrote:


The advantage of pool pbufs is that they can be much faster to allocate,
very important if you are allocating them in a driver. I really feel
that they should not disappear.

I think the point of my message has been missed. I know the pool buffers
are faster to allocate and deallocate, but the profiling I've done shows
that the performance impact of allocation is very small. Therefore the
fact that it is faster doesn't actually make a significant difference to
the overall performance of the IP stack. I was hoping someone else could
>
What exactly did you measure? and can you post profiling results.

Request/Reply type UDP connection, or bi-directional TCP traffic, etc.
under what conditions?

Note that many lwIP projects are deeply embedded, i.e. no underlying software is available, and no memory allocator is present. In such an environment, optimising the pbuf memory allocator for lwIP is the best choice. Even if we replace the memory allocator with something else,
it has to compete in many ways.

coroborate my profiling results, because it appears to me that the pool
allocator may be a case of premature optimisation.

If that is the case, where do you think most optimisation can be achieved instead. Maybe we should concentrate on that?


[0] for the sake of discussion, a general purpose allocator is any
allocator capable of supplying arbitrarily sized chunks of memory. lwIP's
mem_malloc() will do as an example (though it may or may not be "good").

How about memory fragmentation?

Regards,

Leon.




reply via email to

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