This is the mail archive of the
mailing list for the eCos project.
CYGPKG_NET_MEM_USAGE in the FreeBSD stack cdl
- From: Stanislav Meduna <stano at meduna dot org>
- To: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 02 Feb 2011 18:05:11 +0100
- Subject: [ECOS] CYGPKG_NET_MEM_USAGE in the FreeBSD stack cdl
the formula for CYGPKG_NET_MEM_USAGE in freebsd_net.cdl
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?
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss