diff options
Diffstat (limited to 'src/3rdparty/masm/wtf')
-rw-r--r-- | src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp | 42 | ||||
-rw-r--r-- | src/3rdparty/masm/wtf/OSAllocatorPosix.cpp | 11 | ||||
-rw-r--r-- | src/3rdparty/masm/wtf/Platform.h | 10 |
3 files changed, 17 insertions, 46 deletions
diff --git a/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp b/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp index 27f72073c4..ae0f19281d 100644 --- a/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp +++ b/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp @@ -1,42 +1,6 @@ -/**************************************************************************** -** -** Copyright (C) Rolland Dudemaine All rights reserved. -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtQml module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) Rolland Dudemaine All rights reserved. +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "config.h" #include "OSAllocator.h" diff --git a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp index a8990a92b4..5f95d0e9c8 100644 --- a/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp +++ b/src/3rdparty/masm/wtf/OSAllocatorPosix.cpp @@ -114,11 +114,6 @@ void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable, if (result == MAP_FAILED) CRASH(); - while (madvise(result, bytes, MADV_DONTNEED)) { - if (errno != EAGAIN) - CRASH(); - } - if (fd != -1) close(fd); #else @@ -250,8 +245,10 @@ void OSAllocator::decommit(void* address, size_t bytes) mmap(address, bytes, PROT_NONE, MAP_FIXED | MAP_LAZY | MAP_PRIVATE | MAP_ANON, -1, 0); #elif OS(LINUX) while (madvise(address, bytes, MADV_DONTNEED)) { - if (errno != EAGAIN) - CRASH(); + if (errno != EAGAIN) { + memset(address, 0, bytes); // We rely on madvise to zero-out the memory + break; + } } if (mprotect(address, bytes, PROT_NONE)) CRASH(); diff --git a/src/3rdparty/masm/wtf/Platform.h b/src/3rdparty/masm/wtf/Platform.h index 29decfadcf..4146879c5a 100644 --- a/src/3rdparty/masm/wtf/Platform.h +++ b/src/3rdparty/masm/wtf/Platform.h @@ -45,6 +45,9 @@ /* ==== Platform adaptation macros: these describe properties of the target environment. ==== */ /* CPU() - the target CPU architecture */ +#ifdef Q_OS_VXWORKS +#undef CPU +#endif // Q_OS_VXWORKS #define CPU(WTF_FEATURE) WTF_CPU_##WTF_FEATURE /* HAVE() - specific system features (headers, functions or similar) that are present or not */ #define HAVE(WTF_FEATURE) HAVE_##WTF_FEATURE @@ -224,6 +227,7 @@ || defined(__ARM_ARCH_6K__) \ || defined(__ARM_ARCH_6Z__) \ || defined(__ARM_ARCH_6ZK__) \ + || defined(__ARM_ARCH_6KZ__) \ || defined(__ARM_ARCH_6T2__) \ || defined(__ARMV6__) #define WTF_ARM_ARCH_VERSION 6 @@ -442,6 +446,11 @@ #define WTF_OS_RTEMS 1 #endif +/* OS(VXWORKS) - VXWORKS */ +#if defined(__vxworks) +#define WTF_OS_VXWORKS 1 +#endif + #define WTF_OS_WIN ERROR "USE WINDOWS WITH OS NOT WIN" #define WTF_OS_MAC ERROR "USE MAC_OS_X WITH OS NOT MAC" @@ -457,6 +466,7 @@ || OS(QNX) \ || OS(RTEMS) \ || OS(SOLARIS) \ + || OS(VXWORKS) \ || defined(unix) \ || defined(__unix) \ || defined(__unix__) |