| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rework the way the QResourceManager allocates and manages
it's resources. Get rid of the huge pre-allocated freelist,
and instead merge it with the counter field (that is now
always a quintptr large).
Give QHandle a direct pointer to it's data in addition to
the counter. This makes QHandle 8 or 16 bytes large, but
speeds up access to it's data and gives more safety on the
counter as that one now always has at least 31 bits.
Counter and the linked freelist use the same memory location.
To avoid potential conflicts, make sure the counter is always
an odd number, so it can't be a valid pointer.
Do not use INDEXBITS anymore, the resource manager can now
always allocate as many resources as we have RAM available
and will grow with the required use (and not allocate fixed
memory upfront).
This change reduces the memory consumption of the qardboard
example from a bit above 40 to 10MB.
Change-Id: I514f2d3f957f8635098fb88342e42e3361456340
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|\
| |
| |
| | |
Change-Id: I34a98a52cb30084471fd329e36cda7f64bf0af08
|
| |
| |
| |
| |
| |
| | |
Change-Id: I98a31d165367e725c902df368c9c2824439a47d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QHandle uses an union internally so the value of handle is composed of
values of three other integer fields, as defined in Data structure.
The value is different on big endian and little endian systems. This
commit introduces a new GET_EXPECTED_HANDLE macro which determines what
the handle should be equal to based on values of those integer fields
and the system endianness. Note that the values of those fields are
verified too in the tests.
Change-Id: I1f1e37a7469995879ff94e8fc2d6b974c1d4359b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|/
|
|
|
|
|
|
| |
Updated license headers to use new GPL-EXCEPT header instead of LGPL3 one
(in those files which will be under GPL 3 with exceptions)
Change-Id: I930c6234bfe720d38c596bbc3d1f39be75a7328b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: I4ca133aebad0c088296ab293f95f0a6d76d18395
Task-number: QTBUG-39946
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
Update other aspects, tests and examples accordingly.
Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
| |
As for preparation for Qt5.5 release the copyright header is
updated to correspond the current license requirements.
Change-Id: I36632918b66f455539453b42c369689fb11298ec
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
QHandleManager worked only when INDEXBITS was set to the default value 16.
This is corrected now so that a QResourceManager<T, 4> created a
QHandleManager<T, 4> which provides QHandle<T, 4>
Follow up commits will follow for the refactoring of QResourcesManager into
subclasses that can implement their own dedicated memory allocation scheme.
Change-Id: If3b3fb43ae1c9473d9777cf9ba984ba37a65cfa9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
With: Paul Lemire
Change-Id: I47a228553da06d9692a206fd2424beea0a163b2f
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|