Mercurial > hg > nginx-quic
annotate auto/os/solaris @ 6133:af7eba90645d
Win32: shared memory base addresses and remapping.
Two mechanisms are implemented to make it possible to store pointers
in shared memory on Windows, in particular on Windows Vista and later
versions with ASLR:
- The ngx_shm_remap() function added to allow remapping of a shared memory
zone to the address originally used for it in the master process. While
important, it doesn't solve the problem by itself as in many cases it's
not possible to use the address because of conflicts with other
allocations.
- We now create mappings at the same address in all processes by starting
mappings at predefined addresses normally unused by newborn processes.
These two mechanisms combined allow to use shared memory on Windows
almost without problems, including reloads.
Based on the patch by Sergey Brester:
http://mailman.nginx.org/pipermail/nginx-devel/2015-April/006836.html
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 27 Apr 2015 18:25:42 +0300 |
parents | 62d8db8c7157 |
children | e393c0bf53d3 |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
433
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
433
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
4412 | 3 # Copyright (C) Nginx, Inc. |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
433
diff
changeset
|
4 |
196
11fbd0fc041d
nginx-0.0.1-2003-11-26-18:42:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 |
509 | 6 have=NGX_SOLARIS . auto/have_headers |
455 | 7 |
196
11fbd0fc041d
nginx-0.0.1-2003-11-26-18:42:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 CORE_INCS="$UNIX_INCS" |
11fbd0fc041d
nginx-0.0.1-2003-11-26-18:42:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 CORE_DEPS="$UNIX_DEPS $SOLARIS_DEPS" |
249
2a0540287298
nginx-0.0.2-2004-02-03-19:43:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
248
diff
changeset
|
10 CORE_SRCS="$UNIX_SRCS $SOLARIS_SRCS " |
2816
af0eaf409225
Solaris 10 has sched_yield() in libc
Igor Sysoev <igor@sysoev.ru>
parents:
1490
diff
changeset
|
11 CORE_LIBS="$CORE_LIBS -lsocket -lnsl" |
196
11fbd0fc041d
nginx-0.0.1-2003-11-26-18:42:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
12 |
1490 | 13 NGX_RPATH=YES |
14 | |
455 | 15 # Solaris's make does not support a blank line between target and rules |
16 ngx_spacer= | |
283
8f65fee68270
nginx-0.0.2-2004-03-10-20:55:19 import
Igor Sysoev <igor@sysoev.ru>
parents:
281
diff
changeset
|
17 |
2816
af0eaf409225
Solaris 10 has sched_yield() in libc
Igor Sysoev <igor@sysoev.ru>
parents:
1490
diff
changeset
|
18 CC_AUX_FLAGS="$CC_AUX_FLAGS -D_FILE_OFFSET_BITS=64 -lsocket -lnsl" |
433
9a97dcdd2421
nginx-0.0.11-2004-09-21-19:47:05 import
Igor Sysoev <igor@sysoev.ru>
parents:
425
diff
changeset
|
19 |
9a97dcdd2421
nginx-0.0.11-2004-09-21-19:47:05 import
Igor Sysoev <igor@sysoev.ru>
parents:
425
diff
changeset
|
20 |
285
8f48e6366d09
nginx-0.0.2-2004-03-11-18:42:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
283
diff
changeset
|
21 if [ $ZLIB_ASM != NO ]; then |
8f48e6366d09
nginx-0.0.2-2004-03-11-18:42:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
283
diff
changeset
|
22 echo "$0: error: the --with-zlib-asm=CPU option is not supported" |
8f48e6366d09
nginx-0.0.2-2004-03-11-18:42:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
283
diff
changeset
|
23 echo "on that platform" |
8f48e6366d09
nginx-0.0.2-2004-03-11-18:42:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
283
diff
changeset
|
24 echo |
8f48e6366d09
nginx-0.0.2-2004-03-11-18:42:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
283
diff
changeset
|
25 |
8f48e6366d09
nginx-0.0.2-2004-03-11-18:42:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
283
diff
changeset
|
26 exit 1 |
8f48e6366d09
nginx-0.0.2-2004-03-11-18:42:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
283
diff
changeset
|
27 fi |
8f48e6366d09
nginx-0.0.2-2004-03-11-18:42:41 import
Igor Sysoev <igor@sysoev.ru>
parents:
283
diff
changeset
|
28 |
196
11fbd0fc041d
nginx-0.0.1-2003-11-26-18:42:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
29 |
455 | 30 ngx_feature="sendfilev()" |
469 | 31 ngx_feature_name="NGX_HAVE_SENDFILE" |
455 | 32 ngx_feature_run=no |
33 ngx_feature_incs="#include <sys/sendfile.h>" | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
719
diff
changeset
|
34 ngx_feature_path= |
455 | 35 ngx_feature_libs="-lsendfile" |
36 ngx_feature_test="int fd = 1; sendfilevec_t vec[1]; | |
37 size_t sent; ssize_t n; | |
4559
62d8db8c7157
Fixed more gcc46 warnings in configure tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
38 n = sendfilev(fd, vec, 1, &sent); |
62d8db8c7157
Fixed more gcc46 warnings in configure tests.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
39 if (n == -1) return 1" |
455 | 40 . auto/feature |
197
0b81c7a0b133
nginx-0.0.1-2003-11-27-10:45:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
41 |
248
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
198
diff
changeset
|
42 |
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
198
diff
changeset
|
43 if [ $ngx_found = yes ]; then |
197
0b81c7a0b133
nginx-0.0.1-2003-11-27-10:45:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
44 CORE_SRCS="$CORE_SRCS $SOLARIS_SENDFILEV_SRCS" |
0b81c7a0b133
nginx-0.0.1-2003-11-27-10:45:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
45 CORE_LIBS="$CORE_LIBS -lsendfile" |
0b81c7a0b133
nginx-0.0.1-2003-11-27-10:45:22 import
Igor Sysoev <igor@sysoev.ru>
parents:
196
diff
changeset
|
46 fi |
719
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
47 |
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
48 |
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
49 ngx_feature="event ports" |
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
50 ngx_feature_name="NGX_HAVE_EVENTPORT" |
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
51 ngx_feature_run=no |
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
52 ngx_feature_incs="#include <port.h>" |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
719
diff
changeset
|
53 ngx_feature_path= |
719
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
54 ngx_feature_libs= |
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
55 ngx_feature_test="int n = port_create()" |
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
56 . auto/feature |
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
57 |
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
58 if [ $ngx_found = yes ]; then |
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
59 CORE_SRCS="$CORE_SRCS $EVENTPORT_SRCS" |
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
60 EVENT_MODULES="$EVENT_MODULES $EVENTPORT_MODULE" |
f30b1a75fd3b
Solaris 10 event ports support
Igor Sysoev <igor@sysoev.ru>
parents:
561
diff
changeset
|
61 fi |