Problem with MGETHDR

Alexey S. Fadeyev alexey at vocord.com
Wed Apr 19 15:23:44 UTC 2000


> > The default numbers are certainly on the small side, especially if
> > you're on a network with lots of broadcast traffic.  For most of my
> > applications I up these sizes by a factor of 4 or so -- but my boards
> > have 4 or 16 Mbytes of memory respectively, and are controlling a very
> > large, very expensive, piece of equipment.

I increased the mbuf/clusters from default 64k/128k to 96k/150k. It listened
> on the ethernet all night without panic but as soon as I attempted to send
a
> message this morning it crashed with the above panic message. So I will
try
> increasing them more.
>
> My 16Mhz 386sx system has only about 1Meg max for all memory allocations
> plus about 3/4Meg for code. Is this sufficient for a useful tcp/ip
> application?  I have already had to allocate 150 receive buffers of size
> 1520 byte for the ethernet driver (82596) and I still seem to run out of
> receive buffers alot just listening on the network. The only other thing
> running is the timer interrupt at the highest interrupt priority.

My board have 16Mbytes of memory.
But can anyone explain me how MGETHDR works in RTEMS' examples?
MGETHDR (m, M_WAIT, MT_DATA);

MGETHDR use m_mballoc which in its turn use kmem_malloc.
But if we'll use it with M_WAIT it'll throw rtems_panic.
So i use MGETHDR with M_NOWAIT flag - is it correct?
If no - how I can fix it?

Alexey





More information about the users mailing list