Memory allocations of Message Queues

Hi…
I am using Message Queues for IPC. I wanted to know that whether the memory occupied by these queues is allocated on Disk or RAM.
Also i would like to know that How is the memory for the queues allocated?
->Is it Allocated staticalyy equal to the size of the queue OR
->It is allocated as the messages are inserted in a queue.

Thanks…

There are to queue managers mqueue and mq. The queues are allocated in RAM. In the case of mq it is all allocated statically. I’m not sure about mqueue however I would guess it is also allocated statically.