1 /* Flags for BSD-style memory management. OSF/1 version.
2 Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 #define _BITS_MMAN_H 1
23 /* Protections are chosen from these bits, OR'd together. The
24 implementation does not necessarily support PROT_EXEC or PROT_WRITE
25 without PROT_READ. The only guarantees are that no writing will be
26 allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
28 #define PROT_NONE 0x00 /* No access. */
29 #define PROT_READ 0x01 /* Pages can be read. */
30 #define PROT_WRITE 0x02 /* Pages can be written. */
31 #define PROT_EXEC 0x04 /* Pages can be executed. */
33 /* Flags contain mapping type, sharing type and options. */
35 /* Mapping type (must choose one and only one of these). */
37 # define MAP_FILE 0x00 /* Mapped from a file or device. */
38 # define MAP_ANON 0x10 /* Allocated from anonymous virtual memory. */
39 # define MAP_ANONYMOUS MAP_ANON
40 # define MAP_TYPE 0xf0 /* Mask for type field. */
43 /* Sharing types (must choose one and only one of these). */
44 #define MAP_SHARED 0x01 /* Share changes. */
45 #define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
48 #define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */
50 # define MAP_VARIABLE 0 /* Absence of MAP_FIXED. */
51 # define MAP_HASSEMPHORE 0x0200 /* Region may contain semaphores. */
52 # define MAP_INHERIT 0x0400 /* Region is retained after exec. */
53 # define MAP_UNALIGNED 0x0800 /* File offset need not be page-aligned. */
56 /* Advice to `madvise'. */
58 # define MADV_NORMAL 0 /* No further special treatment. */
59 # define MADV_RANDOM 1 /* Expect random page references. */
60 # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
61 # define MADV_WILLNEED 3 /* Will need these pages. */
62 # define MADV_DONTNEED 4 /* Don't need these pages. */
63 # define MADV_SPACEAVAIL 5 /* Ensure that resources are available. */
66 /* Flags to `msync'. */
67 #define MS_ASYNC 1 /* Asynchronous cache flush. */
68 #define MS_SYNC 3 /* Synchronous cache flush. */
69 #define MS_INVALIDATE 4 /* Invalidate cached pages. */
71 #endif /* bits/mman.h */