Maximum size of Message with QNX4 Send() QNX6 MsgSend()

Hi Community

I’ve heard it is possible to send Messages up to 65535 Byte in QNX6
with Send(), Receive() Reply().

But I’am able only to send Messages up to 32768 Byte.

If I try to send bigger messages,
following error occur:

Stack Overflow at 0007:0000A01A

My message is build follows,

char string[BLOCKSIZE];

while (i < BLOCKSIZE )
string[i++] = ‘x’;

string[BLOCKSIZE] = ‘\0’;

Send(npid, string, NULL, sizeof(string), NULL)

Receive()…
Reply()…

How is it possible to send bigger messages under QNX4 with
Send(), Receive(), Reply() and under QNX6 witch MsgSend(), MsgReceive(), MsgReply().

Thank you !!!

try to increase program stack:
pthread_attr_setstacksize( &attr, 1024*10 );
or
Project->properties->compile->stack size.

<<How is it possible to send bigger messages under QNX4 with
Send(), Receive(), Reply() and under QNX6 witch MsgSend(), MsgReceive(), MsgReply(). >>
Use MsgRead & MsgWrite

Thank you qnxloader

but I need <pthread.h> ,

QNX 4 is unable to open it.

Stack size maybe in watcom compile options…

Ok

I try to find it

Thank You !!!

Besides, string[BLOCKSIZE] is out of allocated memory, even if it is NULL.
If you declare char string [BLOCKSIZE], then string[BLOCKSIZE-1] is value of the last block in the allocated memory. However, it’s out of the subject of this topic. ;)

In fact in QNX6 you can send messages of any size, even Megs, not just 65535 bytes.