On Monday 17 October 2011 11:01:50 ext Thiago Macieira wrote:
> On Monday, 17 de October de 2011 10:46:03 André Pönitz wrote:
> > Re "hash": Can't the hash be put at ((char*)data)[-4] (plus the necessary
> > adjustments)?
> 
> Yes, and it can also be stored past the end of the data and a suitable bit 
> set 
> in the flags.
> 
> In fact, that's not a bad idea: storing an extra header *past* the end of the 
> data. It wouldn't affect the alignment constraints.

Why "past"? Don't we typically get memory allocated at 16*n+8, and would 
like to use 16*m (with m = n+1 perhaps) instead? Adjusting it would leave 
us with a "natural" gap of 8 bytes in front of the "main" data, 4 of which
could be used for the hash.

Actually, with 4 more left, couldn't even the "alloc" field could go there?
It's rarely accessed, and would take some pressure off the main structure.

> > Re "QList-and-QVector" merge: I'd really like to see reference counting
> > _removed_ from QVector. We do need _one_ easy-to-use-no-overhead
> > container. That probably make that merge harder....
> 
> João had some ideas on how to do this. When we talked, he basically wanted 
> the 
> same API, on the same QVectorData header, but without using the reference 
> counter field.

If that works, it should fit the bill, too.

Andre'
_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to