nxt_mem_map.h (0:a63ceefd6ab0) nxt_mem_map.h (2084:7d479274f334)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#ifndef _NXT_UNIX_MEM_MAP_H_INCLUDED_
8#define _NXT_UNIX_MEM_MAP_H_INCLUDED_

--- 29 unchanged lines hidden (view full) ---

38
39#else
40#define NXT_MEM_MAP_PREFAULT 0
41#endif
42
43#define NXT_MEM_MAP_FILE (MAP_SHARED | NXT_MEM_MAP_PREFAULT)
44
45
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#ifndef _NXT_UNIX_MEM_MAP_H_INCLUDED_
8#define _NXT_UNIX_MEM_MAP_H_INCLUDED_

--- 29 unchanged lines hidden (view full) ---

38
39#else
40#define NXT_MEM_MAP_PREFAULT 0
41#endif
42
43#define NXT_MEM_MAP_FILE (MAP_SHARED | NXT_MEM_MAP_PREFAULT)
44
45
46#define \
47 nxt_mem_map_file_ctx_t(ctx)
46#define nxt_mem_map_file_ctx_t(ctx)
48
49
47
48
50#define \
51nxt_mem_map(addr, ctx, len, protection, flags, fd, offset) \
49#define nxt_mem_map(addr, ctx, len, protection, flags, fd, offset) \
52 nxt_mem_mmap(addr, len, protection, flags, fd, offset)
53
54
50 nxt_mem_mmap(addr, len, protection, flags, fd, offset)
51
52
55#define \
56nxt_mem_unmap(addr, ctx, len) \
53#define nxt_mem_unmap(addr, ctx, len) \
57 nxt_mem_munmap(addr, len)
58
59
60NXT_EXPORT void *nxt_mem_mmap(void *addr, size_t len, nxt_uint_t protection,
61 nxt_uint_t flags, nxt_fd_t fd, nxt_off_t offset);
62NXT_EXPORT void nxt_mem_munmap(void *addr, size_t len);
63
64
65#endif /* _NXT_UNIX_MEM_MAP_H_INCLUDED_ */
54 nxt_mem_munmap(addr, len)
55
56
57NXT_EXPORT void *nxt_mem_mmap(void *addr, size_t len, nxt_uint_t protection,
58 nxt_uint_t flags, nxt_fd_t fd, nxt_off_t offset);
59NXT_EXPORT void nxt_mem_munmap(void *addr, size_t len);
60
61
62#endif /* _NXT_UNIX_MEM_MAP_H_INCLUDED_ */