blob: b56edfc6e7b0dfdbc2fcc9dbf9f9f365c5452206 [file] [log] [blame]
David Sehr10db8fe2018-07-18 11:01:20 -07001/*
2 * Copyright (C) 2018 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
17#ifndef ART_LIBARTBASE_BASE_MMAN_H_
18#define ART_LIBARTBASE_BASE_MMAN_H_
19
20#ifdef _WIN32
21
22// There is no sys/mman.h in mingw.
David Sehr10db8fe2018-07-18 11:01:20 -070023
David Sehr9d9227a2018-12-19 12:32:50 -080024#define PROT_READ 0x1
25#define PROT_WRITE 0x2
26#define PROT_EXEC 0x4
27#define PROT_NONE 0x0
David Sehr10db8fe2018-07-18 11:01:20 -070028
David Sehr9d9227a2018-12-19 12:32:50 -080029#define MAP_SHARED 0x01
30#define MAP_PRIVATE 0x02
David Sehr10db8fe2018-07-18 11:01:20 -070031
David Sehr9d9227a2018-12-19 12:32:50 -080032#define MAP_FAILED ((void*) -1)
33#define MAP_FIXED 0x10
34#define MAP_ANONYMOUS 0x20
David Sehr10db8fe2018-07-18 11:01:20 -070035
36#else
37
38#include <sys/mman.h>
39
40#endif
41
42
43#endif // ART_LIBARTBASE_BASE_MMAN_H_