This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
FreeBSD Network Stack memory allocation
- From: "Victor Valencia" <victor dot valencia at elementlabs dot com>
- To: <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 7 Jan 2008 14:41:59 -0800
- Subject: [ECOS] FreeBSD Network Stack memory allocation
I am building an application using ecos on an ARM9 processor using the
FreeBSD stack. The default
configuration for the stack allocates 256k + (max-sockets * 1024). It then
breaks it up into
1/2 for mbufs, 1/4 for general heap, and 1/4 for clusters.
My question is how do I determine how much memory I should allocate for my
application? Is
there some formula for determining how much to allocate based on number of
sockets, max packet size,
network throughput, etc?
My application is fairly simple and maintains TCP sockets with up to 4
hosts. I am trying to minimize
the amount of network memory I need to hopefully under 128k but I have no
way of
verifying analytically if this will work or not. Any suggestions??
Thanks In Advance
Victor
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss