QThread/Linux: disable the filling in of the trivial cpuset variable
We don't need it and it just makes the code slower with a large array. Change-Id: I06dfa436309bfd249c06fffddb4cec658cf356a9 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
918566aedd
commit
39564261b2
@ -489,6 +489,11 @@ Qt::HANDLE QThread::currentThreadIdImpl() noexcept
|
|||||||
int QThreadPrivate::idealThreadCount = 1;
|
int QThreadPrivate::idealThreadCount = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if QT_CONFIG(trivial_auto_var_init_pattern) && defined(Q_CC_GNU_ONLY)
|
||||||
|
// Don't pre-fill the automatic-storage arrays used in this function
|
||||||
|
// (important for the FreeBSD & Linux code using a VLA).
|
||||||
|
__attribute__((optimize("trivial-auto-var-init=uninitialized")))
|
||||||
|
#endif
|
||||||
int QThread::idealThreadCount() noexcept
|
int QThread::idealThreadCount() noexcept
|
||||||
{
|
{
|
||||||
int cores = 1;
|
int cores = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user