PostgreSQL Source Code: src/include/portability/mem.h Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12#ifndef MEM_H

13#define MEM_H

14

15#define IPCProtection (0600)

16

17#ifdef SHM_SHARE_MMU

18#define PG_SHMAT_FLAGS SHM_SHARE_MMU

19#else

20#define PG_SHMAT_FLAGS 0

21#endif

22

23

24#ifndef MAP_ANONYMOUS

25#define MAP_ANONYMOUS MAP_ANON

26#endif

27

28

29#ifndef MAP_HASSEMAPHORE

30#define MAP_HASSEMAPHORE 0

31#endif

32

33

34

35

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

44#ifndef MAP_FAILED

45#define MAP_FAILED ((void *) -1)

46#endif

47

48#endif