PostgreSQL Source Code
git master
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
f
h
i
n
o
p
r
s
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
mem.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* mem.h
4
* portability definitions for various memory operations
5
*
6
* Copyright (c) 2001-2024, PostgreSQL Global Development Group
7
*
8
* src/include/portability/mem.h
9
*
10
*-------------------------------------------------------------------------
11
*/
12
#ifndef MEM_H
13
#define MEM_H
14
15
#define IPCProtection (0600)
/* access/modify by user only */
16
17
#ifdef SHM_SHARE_MMU
/* use intimate shared memory on Solaris */
18
#define PG_SHMAT_FLAGS SHM_SHARE_MMU
19
#else
20
#define PG_SHMAT_FLAGS 0
21
#endif
22
23
/* Linux prefers MAP_ANONYMOUS, but the flag is called MAP_ANON on other systems. */
24
#ifndef MAP_ANONYMOUS
25
#define MAP_ANONYMOUS MAP_ANON
26
#endif
27
28
/* BSD-derived systems have MAP_HASSEMAPHORE, but it's not present (or needed) on Linux. */
29
#ifndef MAP_HASSEMAPHORE
30
#define MAP_HASSEMAPHORE 0
31
#endif
32
33
/*
34
* BSD-derived systems use the MAP_NOSYNC flag to prevent dirty mmap(2)
35
* pages from being gratuitously flushed to disk.
36
*/
37
#ifndef MAP_NOSYNC
38
#define MAP_NOSYNC 0
39
#endif
40
41
#define PG_MMAP_FLAGS (MAP_SHARED|MAP_ANONYMOUS|MAP_HASSEMAPHORE)
42
43
/* Some really old systems don't define MAP_FAILED. */
44
#ifndef MAP_FAILED
45
#define MAP_FAILED ((void *) -1)
46
#endif
47
48
#endif
/* MEM_H */
src
include
portability
mem.h
Generated on Tue Dec 3 2024 00:13:25 for PostgreSQL Source Code by
1.9.1