6 ms·
I believe this is one of the advantages of 64 bit architectures. That meg of stack size is just a reservation, it's not actually used, unless your thread reall
by eggnet 17y ago
I believe this is one of the advantages of 64 bit architectures. That meg of stack size is just a reservation, it's not actually used, unless your thread really needs it. On a 64 bit machine there is plenty of space to allocate.
- agazso 17y agoYeah, but why would you waste it for stack space, when you can do an event-driven design, and allocate the resources only when needed? Anyways, I was talking about C, where the stack is allocated when the thread is created and you cannot resize it later, nor it will grow automatically. With dynamic languages it is different, but don't expect handling that much connections with them either.
- riobard 17y agoIt doesn't solve the context _switching_ cost.
- kingkongrevenge 17y agoThis just isn't a substantial cost any more. With the latest kernels, thread per connection servers are competitive with event driven servers. This was not true a few years ago.