… | |
… | |
12 | |
12 | |
13 | if ($^O =~ /windows/) { |
13 | if ($^O =~ /windows/) { |
14 | $DEFINE = " -DCORO_LOOSE"; |
14 | $DEFINE = " -DCORO_LOOSE"; |
15 | } elsif ($^O =~ /linux/) { |
15 | } elsif ($^O =~ /linux/) { |
16 | $iface = "l"; |
16 | $iface = "l"; |
|
|
17 | } elsif ($^O =~ /solaris/) { |
|
|
18 | $iface = "s"; |
17 | } elsif (-e "/usr/include/ucontext.h") { |
19 | } elsif (-e "/usr/include/ucontext.h") { |
18 | $iface = "u"; |
20 | $iface = "u"; |
19 | } else { |
21 | } else { |
20 | $iface = "s"; |
22 | $iface = "s"; |
21 | } |
23 | } |
… | |
… | |
23 | print <<EOF; |
25 | print <<EOF; |
24 | |
26 | |
25 | Version 0.12 introduced experimental C context sharing. This makes it |
27 | Version 0.12 introduced experimental C context sharing. This makes it |
26 | possible to share the C stack and context between many coroutines, |
28 | possible to share the C stack and context between many coroutines, |
27 | resulting in memory savings and slight speed gains, at the cost of |
29 | resulting in memory savings and slight speed gains, at the cost of |
28 | potential segfaults. On my Linux/x86 machine this decreased the size of |
30 | potential segfaults (especially with exception handling). On my Linux/x86 |
29 | a new coroutine from 9k to 5k, the savings are much more apparent on |
31 | machine this decreased the size of a new coroutine from 9k to 5k, the |
30 | machines without mmap or good memory management. This algorithm relies |
32 | savings are much more apparent on machines without mmap or good memory |
31 | on the non-fact that the same machine stack pointer indicates the same |
33 | management. This algorithm relies on the non-fact that the same machine |
32 | function call nesting level, which usually works good enough but might |
34 | stack pointer indicates the same function call nesting level, which |
33 | fail... |
35 | usually works good enough but might fail... |
34 | |
36 | |
35 | Disabling this option is save, as it only increases memory consumption. |
37 | The default (disabled) is safe, as it only increases memory consumption. |
36 | |
38 | |
37 | EOF |
39 | EOF |
38 | |
40 | |
39 | print "Do you want to enable experimental context sharing (y/n) [n]? "; |
41 | print "Do you want to enable experimental context sharing (y/n) [n]? "; |
40 | |
42 | |