space requirements _ the RTEMS TCP/IP stack

Sergei Organov osv at topconrd.ru
Thu Nov 20 09:27:06 UTC 2003


Joel Sherrill <joel.sherrill at OARcorp.com> writes:
> aling wrote:
> 
> >How about the scale of the RTEMS TCP/IP stack ? How much space does it
> >require after downloading it to the Flash chip ?
> >  
> >
> ROM or RAM? ROM should be code space and an application with basic networking
> services is on the order of 250-300K.
> 
> RAM is a function of how you configure things and how many buffers you want.
> 
> There was a discussion of this on the mailing list last month with some hints
> as to reducing it.
> 
> Does anyone remember the thread? It was a good discussion and really should
> be in the networking guide.

Do you mean the thread inspired by this one:

<http://www.rtems.com/ml/rtems-users/2003/october/msg00122.html>


BTW, I've recently found that the stack sometimes eats a lot of memory from the
malloc region through 'rtems_bsdnet_malloc()'. It does this, for example, when
target accepts connection and quickly closes it. Each accept/close eats some
memory that is not reclaimed immediately, so a lot of consecutive accept/close
pairs eat a lot. Real-life examples are downloading a lot of small files
through FTP, and a server that closes accepted connection when it has no
resources to handle it.

I've implemented separate region for rtems_bsdnet_malloc() with configurable
size to somehow limit stack requirements and it seems to work fine. The
stack just temporarily stops doing some things when it eats all the memory
from the region, then the memory is reclaimed and things work again.

-- 
Sergei.




More information about the users mailing list