1/*
2 * Copyright (C) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef MALLOC_CONFIG_H
16#define MALLOC_CONFIG_H
17
18#ifdef MALLOC_SECURE_ALL
19
20#ifndef MALLOC_FREELIST_HARDENED
21#define MALLOC_FREELIST_HARDENED
22#endif
23
24#ifndef MALLOC_FREELIST_QUARANTINE
25#define MALLOC_FREELIST_QUARANTINE
26#endif
27
28#ifndef MALLOC_RED_ZONE
29#define MALLOC_RED_ZONE
30#endif
31
32#endif // MALLOC_SECURE_ALL
33
34#if defined(MALLOC_FREELIST_QUARANTINE) && !defined(MALLOC_FREELIST_HARDENED)
35#error MALLOC_FREELIST_QUARANTINE can be only applied when MALLOC_FREELIST_HARDENED is set.
36#endif
37
38#if defined(MALLOC_RED_ZONE) && !defined(MALLOC_FREELIST_QUARANTINE)
39#error MALLOC_RED_ZONE can be only applied when MALLOC_FREELIST_QUARANTINE is set.
40#endif
41
42#endif // MALLOC_CONFIG_H
43
44#define __ATTRP_C11_THREAD ((void*)(uintptr_t)-1)
45
46#endif
47