blob: 71b3be8857abe614e7dc551ab638f9942899c12b [file] [log] [blame]
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -07001/*
Ian Rogers99908912012-08-17 17:28:15 -07002 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -070015 */
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -070016
Ian Rogers99908912012-08-17 17:28:15 -070017#ifndef LIBC_BIONIC_DLMALLOC_H_
18#define LIBC_BIONIC_DLMALLOC_H_
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -070019
Ian Rogers99908912012-08-17 17:28:15 -070020/* Configure dlmalloc. */
21#define HAVE_GETPAGESIZE 1
22#define MALLOC_INSPECT_ALL 1
Ian Rogers99908912012-08-17 17:28:15 -070023#define MSPACES 0
24#define REALLOC_ZERO_BYTES_FREES 1
25#define USE_DL_PREFIX 1
26#define USE_LOCKS 1
Kirill Artamonov3e2d2932012-08-31 09:19:16 -070027#define LOCK_AT_FORK 1
Ian Rogers99908912012-08-17 17:28:15 -070028#define USE_RECURSIVE_LOCK 0
29#define USE_SPIN_LOCKS 0
Rom Lemarchandd0f2a602013-07-23 11:30:52 -070030#define DEFAULT_MMAP_THRESHOLD (64U * 1024U)
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -070031
Ian Rogers99908912012-08-17 17:28:15 -070032/* Include the proper definitions. */
33#include "../upstream-dlmalloc/malloc.h"
The Android Open Source Projecta27d2ba2008-10-21 07:00:00 -070034
Ian Rogers99908912012-08-17 17:28:15 -070035#endif // LIBC_BIONIC_DLMALLOC_H_