Problem with too big data buffer in DEVCTL

bridged with qnx.ddk
Post Reply
juro

Problem with too big data buffer in DEVCTL

Post by juro » Mon Oct 01, 2007 1:52 pm

Hello,
it is possible to send data buffer with size about 1MB with using
DEVCTL?
Or how to send such mount of data between resmgr and client?
Thanks
Juraj

async

RE: Problem with too big data buffer in DEVCTL

Post by async » Wed Oct 03, 2007 3:52 pm

MsgSend() is used to transfer the data, and the maximum size for
one-part message-pass is 2^32 - 1 (SSIZE_MAX). If you want to avoid
copying the data in the buffer, you can use MsgRead () / MsgWrite ()
to read data from the client's address.

David Gibbs

Re: Problem with too big data buffer in DEVCTL

Post by David Gibbs » Tue Oct 09, 2007 9:03 pm

juro <juraj.frank@naex-dot-sk.no-spam.invalid> wrote:
Hello,
it is possible to send data buffer with size about 1MB with using
DEVCTL?
Yes, the API will happily transfer any size of buffer up to the
maximum that can be sent.
Or how to send such mount of data between resmgr and client?
MsgSend() (the underlying kernel call) uses signed 32-bit integers
for message lengths. This suggests the maximum transfer would be
2G -- for a devctl() it would be 2G-sizeof(devctl header).

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com

David Gibbs

Re: Problem with too big data buffer in DEVCTL

Post by David Gibbs » Tue Oct 09, 2007 9:04 pm

async <asreti@gmail-dot-com.no-spam.invalid> wrote:
MsgSend() is used to transfer the data, and the maximum size for
one-part message-pass is 2^32 - 1 (SSIZE_MAX). If you want to avoid
copying the data in the buffer, you can use MsgRead () / MsgWrite ()
to read data from the client's address.
MsgSend() takes signed ints for the lengths. This suggests 2^31, rather
than 2^32.

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com

Post Reply

Return to “qnx.ddk”