This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: "PANIC: zinit: Out of memory" when num sockets increased to 64
- From: Grant Edwards <grante at visi dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 8 Apr 2008 20:38:10 +0000 (UTC)
- Subject: [ECOS] Re: "PANIC: zinit: Out of memory" when num sockets increased to 64
- References: <ftgjns$vf1$1@ger.gmane.org> <20080408202951.GH3552@lunn.ch>
On 2008-04-08, Andrew Lunn <andrew@lunn.ch> wrote:
>> So there's well over 15MB of unallocated RAM. That seems like
>> more than enough RAM to handle 64 sockets.
>>
>> Why am I getting a panic on startup?
>
> The network stack has its own memory pool. See
>
> CYGPKG_NET_MEM_USAGE, CYGPKG_NET_MEMPOOL_SIZE, CYGPKG_NET_MBUFS_SIZE,
> CYGPKG_NET_MBUFS_SIZE.
I increased CYGPKG_NET_MEM_USAGE, and that fixed the problem.
The default value is (256*1024)+(CYGPKG_NET_MAXSOCKETS*1024)
What initially mislead me into thinking I should leave that
alone when I increased the number of sockets was the
description:
Memory designated for networking buffers. This option
controls the amount of memory pre-allocated for buffers used
by the networking code. The number is an upper limit, with
at least enough space to get the stack initialized.
My reading of that is that (256*1024)+(CYGPKG_NET_MAXSOCKETS*1024)
is an upper bound on what's required for the stack to be
initialized. Apparently it isn't.
--
Grant Edwards grante Yow! Vote for ME -- I'm
at well-tapered, half-cocked,
visi.com ill-conceived and
TAX-DEFERRED!
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss