[Gambas-user] gb3: multiple errors

Benoît Minisini gambas at ...1...
Wed Feb 29 14:42:22 CET 2012


Le 29/02/2012 07:26, Kevin Fishburne a écrit :
>>>
>>> Public Struct Server_QueueOut
>>>       Acknowledged As Boolean ' Whether or not transaction has been
>>> acknowledged by recipient.
>>>       Player As Short         ' Number of player transaction was sent to.
>>>       Timestamp As Float      ' Time transaction was sent.
>>>       Type As Byte            ' Transaction type.
>>>       Data As String          ' Transaction payload.
>>> End Struct

Size of the structure (32 bits) :
8 (Gambas object base)
+ 1
+ 1 (padding)
+ 2
+ 4 (padding)
+ 8
+ 1
+ 3 (padding)
+ 4
= 32 bytes

>>> Public QueueOut[2000, 32768] As Struct Server_QueueOut

2000 * 32768 * 32 = 2097152000 bytes = 2 Gb.

It's worse on 64 bits because of the padding.

-- 
Benoît Minisini




More information about the User mailing list