Hi,
Does anyone know what the max message size for mqueue messages is?
For some reason I am not able to make them bigger than 2124bytes even though
I set the size much bigger when opening mqueue!
Thanks for any help
Lars
Hi,
Does anyone know what the max message size for mqueue messages is?
For some reason I am not able to make them bigger than 2124bytes even though
I set the size much bigger when opening mqueue!
Thanks for any help
Lars
Lars Skade <larsskade@telefonica.net> wrote:
Hi,
Does anyone know what the max message size for mqueue messages is?
For some reason I am not able to make them bigger than 2124bytes even though
I set the size much bigger when opening mqueue!
Answered in qnx.rtos, but this is really the right place.
2124 sounds too low – default was, I think, 4096 if no attributes
specified.
Can you post the code where you’re seeing this problem, including
the mq_open()s, and send&receive or read&write.
Please follow-up to newsgroup, rather than personal email.
David Gibbs
QNX Training Services
dagibbs@qnx.com
Dear David,
Problem sorted…more or less at least! It turned out that I had forgot to
cycle the power on the target inbetween changing the message size. I now
can make the buffer bigger, however a different problem has turned up…
with a message size of 2124bytes the mqueue process takes up 20Kb code space
and 2252Kb data space. As I’m running the code on a small target system with
oly 32Mb RAM I quickly get in to problems. Is it normal mqueue takes up that
much space? Is there any way of limiting it?
Thanks for any help
Lars
“David Gibbs” <dagibbs@qnx.com> escribió en el mensaje
news:cikt6j$q23$2@inn.qnx.com…
Lars Skade <> larsskade@telefonica.net> > wrote:
Hi,Does anyone know what the max message size for mqueue messages is?
For some reason I am not able to make them bigger than 2124bytes even
though
I set the size much bigger when opening mqueue!Answered in qnx.rtos, but this is really the right place.
2124 sounds too low – default was, I think, 4096 if no attributes
specified.Can you post the code where you’re seeing this problem, including
the mq_open()s, and send&receive or read&write.-David
Please follow-up to newsgroup, rather than personal email.
David Gibbs
QNX Training Services
dagibbs@qnx.com
Lars Skade <larsskade@telefonica.net> wrote:
Dear David,
Problem sorted…more or less at least! It turned out that I had forgot to
cycle the power on the target inbetween changing the message size.
Shouldn’t need to cycle power – just need to remove the queue. Queue
size/length can only be configured on creation, and the queue will live
as long as any process has it open, and as long as the pathname exists.
If you don’t clean up on termination in your program (mq_unlink), then
try doing a “ls /dev/mqueue”, and then a “rm /dev/mqueue/my_queue_name”.
(Assuming you created a queue with a name of “/my_queue_name”. If you
used some other pathname, the queue may be somewhere else in the pathname
space.
I now
can make the buffer bigger, however a different problem has turned up…
with a message size of 2124bytes the mqueue process takes up 20Kb code space
and 2252Kb data space. As I’m running the code on a small target system with
oly 32Mb RAM I quickly get in to problems. Is it normal mqueue takes up that
much space? Is there any way of limiting it?
When you create a queue, you can specify two parameters – maximum message
size, and maximum number of messages. It looks like you are creating a
queue of (about) 1000 entries, each of which is 2124 bytes == 2124Kb. If
you wish to use less memory, reduce either the maximum number of queue
entries, or the size of each queue entry.
Please follow-up to newsgroup, rather than personal email.
David Gibbs
QNX Training Services
dagibbs@qnx.com