blob: 66bc950f1f31b8141bd28e9de968ba3cd799b436 [file] [log] [blame]
Elliott Hughes2faa5f12012-01-30 14:42:07 -08001/*
2 * 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.
15 */
16
Ian Rogers30fab402012-01-23 15:43:46 -080017#define FOR_DLMALLOC_C // Avoid inclusion of src/malloc.h
18#include "dlmalloc.h"
Carl Shapiro69759ea2011-07-21 18:13:35 -070019
Ian Rogers30fab402012-01-23 15:43:46 -080020#include <stddef.h>
21#include <stdint.h>
22#include <stdlib.h>
Carl Shapiro69759ea2011-07-21 18:13:35 -070023
Ian Rogers30fab402012-01-23 15:43:46 -080024// Disable GCC diagnostics so that -Werror won't fail
Ian Rogers30fab402012-01-23 15:43:46 -080025#pragma GCC diagnostic ignored "-Wunused-variable"
26#pragma GCC diagnostic ignored "-Wempty-body"
Carl Shapiro69759ea2011-07-21 18:13:35 -070027
Ian Rogers30fab402012-01-23 15:43:46 -080028// ART specific morecore implementation
29#define MORECORE(x) art_heap_morecore(m, x)
30extern void* art_heap_morecore(void* m, intptr_t increment);
Carl Shapiro69759ea2011-07-21 18:13:35 -070031
Ian Rogers30fab402012-01-23 15:43:46 -080032// Ugly inclusion of C file so that ART specific #defines configure dlmalloc
33#include "dlmalloc/malloc.c"