[Top][All Lists]

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

Re: [lwip-devel] Removing the restriction on number of sockets

From: Simon Goldschmidt
Subject: Re: [lwip-devel] Removing the restriction on number of sockets
Date: Tue, 8 Aug 2017 06:28:12 +0200

Joel Cunningham wrote:
> Maybe a memory pool for sockets would allow a dynamic/unrestricted size when 
> used with MEMP_MEM_MALLOC = 1
> (as Simon suggested) and MEM_LIBC_MALLOC = 1, but a fixed size for systems 
> with MEMP_MEM_MALLOC = 0.

That might work good in the "IP stack service process" case (like this Hurd 
thing or David's Minix port) where
it's hard to set overall restrictions via pool sizes, anyway.

> Since memory pools typically allocate one at a time, we’d need to figure out 
> how to link the allocations together
> that allows fast lookup or maybe use some type of slab allocation...I’ll 
> brainstorm this some more

We do have the same performance problem on the RX side where netifs and pcbs 
are iterated. This doesn't hurt for
most systems lwIP is targeting since they aren't expected to have many 
connections and the code is nice and
small that way (remember "lw" stands for "lightweight" - whatever that means in 

Summed up, something like a hash might be better when it comes to performance, 
but consumes way too much memory
for the small systems.


reply via email to

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