… | |
… | |
121 | } |
121 | } |
122 | } else { |
122 | } else { |
123 | print "\nUsing microsoft compatible coroutines\n\n"; |
123 | print "\nUsing microsoft compatible coroutines\n\n"; |
124 | } |
124 | } |
125 | |
125 | |
|
|
126 | print <<EOF; |
|
|
127 | |
|
|
128 | Per-context stack size: Depending on your settings, Coro tries to share |
|
|
129 | the C stack as much as possible, but sometimes it needs to allocate a |
|
|
130 | new one. This setting controls the maximum size that gets allocated, and |
|
|
131 | should not be too high, memory and address space still gets wasted even if |
|
|
132 | it's not fully used. |
|
|
133 | |
|
|
134 | The value entered will be multiplied by sizeof(long), which is usually |
|
|
135 | 4 on 32-bit systems, and 8 on 64-bit systems. A setting of 16384 (the |
|
|
136 | default) therefore corresponds to a 64k to 128k stack, which usually |
|
|
137 | is ample space. Some perls (mostly threaded ones) may need much, much |
|
|
138 | more: If Coro segfaults with weird backtraces (e.g. in a function |
|
|
139 | prologue) or in t/10_bugs.t, you might want to increase this to 65536 or |
|
|
140 | more (debian might require this). |
|
|
141 | |
|
|
142 | EOF |
|
|
143 | |
|
|
144 | my $stacksize = prompt ("C Stack Size", "16384"); |
|
|
145 | $DEFINE .= " -DSTACKSIZE=$stacksize"; |
|
|
146 | |
|
|
147 | print "using a stacksize of $stacksize * sizeof(long)\n"; |
|
|
148 | |
|
|
149 | print "\n"; |
|
|
150 | |
126 | WriteMakefile( |
151 | WriteMakefile( |
127 | NAME => "Coro::State", |
152 | NAME => "Coro::State", |
128 | VERSION_FROM => "State.pm", |
153 | VERSION_FROM => "State.pm", |
129 | DEFINE => $DEFINE, |
154 | DEFINE => $DEFINE, |
130 | DIR => [], |
155 | DIR => [], |