On 02/02/2011 17:05, Stanislav Meduna wrote:
Hi,

the formula for  CYGPKG_NET_MEM_USAGE in freebsd_net.cdl

   (256*1024)+(CYGPKG_NET_MAXSOCKETS*1024)

is IMHO completely bogus.

First, from my debugging it looks like the stack allocates
1352 bytes per socket:
- 176 for socket
- 280 for UDP
- 616 for TCP
- 280 for raw

Second, these things are allocated from an area of
CYGPKG_NET_MEMPOOL_SIZE, which is CYGPKG_NET_MEM_USAGE/4.

I don't understand the BSD stack enough to know what exactly
can be allocated and from where, but this is surely wrong -
the pool size expands 256 bytes per additional socket,
whereas it should be 1352 bytes per socket.

Anyone already tried to find the correct way of counting?

I found exactly the same thing previously and got very little response to my email.

See http://sourceware.org/ml/ecos-discuss/2007-10/msg00076.html

Regards
Will

Regards

--
------------------------------------------------------------------------
Will Wagner                                     will_wag...@carallon.com
Development Manager                      Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply via email to