Maximum number of messages in a message queue ?

Joel Sherrill <> joel.sherrill at
Mon Sep 6 20:34:02 UTC 2004

Rolf Schroedter wrote:
> RTEMS 4.6, leon-sparc
> Is there a maximum number of messages in a message queue ?
> I'm asking, because I'm failing to create a message queue
> with 150000 messages, 8 bytes each (error code=5: "too many").
> Creating the same queue with ~130000 messages succeeds.
> Increasing the starting stackpointer (should increase the heap ?)
> doesn't help.

The message buffers do not come from the heap, they come from
the RTEMS workspace.  If you are using confdefs.h, then
set CONFIGURE_MEMORY_OVERHEAD to something to account for
the huge amount of memory your messages are consuming.

What are you doing with that many messages in a queue?  What
are you doing with the queue?  It would seem that if you
really had that many messages in the queue, it would take
a long time to process them.  Just curious.

> Any help is appreciated.
> Thanks and regards,
> Rolf.
> ------------------------------------
> Rolf Schroedter
> German Aerospace Center
> Institute of Planetary Research
> D-12489 Berlin, Rutherfordstrasse 2
> Tel/Fax:  (+49) (30) 67055-416/384
> Email:    Rolf.Schroedter at

Joel Sherrill, Ph.D.             Director of Research & Development
joel at                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985

More information about the users mailing list