We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Set stack size for threads.
Hongli Lai (Phusion) (author)
Fri Apr 18 17:11:12 -0700 2008
commit  ccf0a6ec3cdbe9cbf0515c46c6e59d22253434a3
tree    e361651fb6ef465ccf20ee9164b6ed537cf1286a
parent  d5495054fa08681f66bb39878cb4ec03df2acecf
...
147
148
149
150
 
151
152
153
...
147
148
149
 
150
151
152
153
0
@@ -147,7 +147,7 @@ subdir 'ext/apache2' do
0
   ] do
0
     create_executable "ApplicationPoolServerExecutable",
0
       'ApplicationPoolServerExecutable.cpp Utils.o Logging.o',
0
- "#{CXXFLAGS} #{LDFLAGS} ../boost/src/libboost_thread.a -lpthread"
0
+ "-I.. #{CXXFLAGS} #{LDFLAGS} ../boost/src/libboost_thread.a -lpthread"
0
   end
0
   
0
   desc "Install mod_passenger Apache 2 module"
...
283
284
285
286
 
287
288
289
...
356
357
358
359
360
361
362
363
364
365
366
367
368
369
...
283
284
285
 
286
287
288
289
...
356
357
358
 
 
 
 
 
 
 
 
359
360
361
0
@@ -283,7 +283,7 @@ public:
0
    * connection.
0
    */
0
   void start(const weak_ptr<Client> self) {
0
- thr = new thread(bind(&Client::threadMain, this, self));
0
+ thr = new thread(bind(&Client::threadMain, this, self), 1024 * 128);
0
   }
0
   
0
   ~Client() {
0
@@ -356,14 +356,6 @@ Server::start() {
0
 
0
 int
0
 main(int argc, char *argv[]) {
0
- // Set stack size (also for threads) to 3 MB. Some people have
0
- // configured a rediculously large stack size and we don't want
0
- // to be bitten by that.
0
- struct rlimit limit;
0
- limit.rlim_cur = 3 * 1024 * 1024;
0
- limit.rlim_max = limit.rlim_cur + 2048;
0
- setrlimit(RLIMIT_STACK, &limit);
0
-
0
   Server server(SERVER_SOCKET_FD, argv[1], argv[2], argv[3], argv[4], argv[5]);
0
   return server.start();
0
 }

Comments

    No one has commented yet.