| 1 | // Copyright (C) 2022 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QMALLOC_H |
| 5 | #define QMALLOC_H |
| 6 | |
| 7 | #include <QtCore/qcompilerdetection.h> |
| 8 | #include <QtCore/qtconfigmacros.h> |
| 9 | #include <QtCore/qtcoreexports.h> |
| 10 | |
| 11 | #include <cstddef> // size_t |
| 12 | |
| 13 | #if 0 |
| 14 | #pragma qt_class(QtMalloc) |
| 15 | #pragma qt_sync_stop_processing |
| 16 | #endif |
| 17 | |
| 18 | QT_BEGIN_NAMESPACE |
| 19 | |
| 20 | Q_CORE_EXPORT void *qMallocAligned(size_t size, size_t alignment) Q_ALLOC_SIZE(1); |
| 21 | Q_CORE_EXPORT void *qReallocAligned(void *ptr, size_t size, size_t oldsize, size_t alignment) Q_ALLOC_SIZE(2); |
| 22 | Q_CORE_EXPORT void qFreeAligned(void *ptr); |
| 23 | |
| 24 | QT_END_NAMESPACE |
| 25 | |
| 26 | #endif // QMALLOC_H |
| 27 | |