On sábado, 9 de junho de 2012 19.15.09, Olivier Goffart wrote:
> I suggest re-ordering the offset in order to avoid padding.

It doesn't help.

> struct Q_CORE_EXPORT QArrayData
> {
>     QtPrivate::RefCount ref;
>     uint flags;
>     qptrdiff offset; // in bytes from beginning of header
>     int size;       // ### move to the main class body?
>     // 4 byte tail padding on 64 bits
>
> };
> // size is 16 / 24 bytes (but really 20 bytes as we could use the tail
> padding to put the payload already)
>
>
> struct QArrayAllocatedData : public QArrayData
> {
>     uint alloc;
> };
> // size is 20 / 24 bytes  (the tail padding bytes are used)

The size here is 20 / 32 bytes. The tail padding bytes are not used.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to