POSIX message queues should not allocate memory on send

From: Martijn Sipkema
Date: Fri May 14 2004 - 04:33:15 EST


There is a problem with the current POSIX message queue
implementation. mq_send()/mq_timedsend() may not return
ENOMEM and this means memory for mq_maxmsg*mq_msgsize
will have to be allocated on queue creation. I think POSIX MSG
message passing being part of the REALTIME extensions this
makes sense. I've already mentioned this once to the implementors
of the current implementation, but they did not agree with my
reading of the standard.

The default mq_msgsize also seems a little large to me, but
I don't see why defaults are needed; if I understand the standard
correctly then creating a new message queue without mq_attr
should create an empty queue, which thus cannot be used to
pass messages.

--ms




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/