Is there maximum number of arguments
Thiago Macieira
thiago at kde.org
Mon Aug 25 07:16:56 PDT 2008
On Segunda 25 Agosto 2008 14:42:22 Jukka Mähönen wrote:
> Hi,
>
> I am writing a program where I need to send as much arguments as
> possible in one D-Bus message. When the count of arguments exceeds 255
> my program crashes. It only says "Memory overflow". After that I have
> sent only 255 arguments in one message, but even now I get the same
> error sometimes when I send messages in a loop.
Yes, there is a maximum. The signature of a message is limited to 255 bytes.
That means you can only have as many arguments as fit into 255 bytes.
That means 255 simple types (including variants), 126 two-character types
(such as simple arrays), 85 structures of a single type (such as (i)), 51
simple maps (such as a{sv}).
Note that this limit also applies to structures as well, so if you put a
structure in a variant, its signature must still fit into 255 bytes.
http://dbus.freedesktop.org/doc/dbus-specification.html
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080825/6be50733/attachment.pgp
More information about the dbus
mailing list