You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typically a process' stack size is quite small (a few mega bytes). For example, it's 8MB on Mac. Think we can increase that, but it's not ideal if a program has 10s or 100s threads because each thread will consume that amount of memory reserved for stack.
The text was updated successfully, but these errors were encountered:
Yes, but does not sound good if a class can only be used on heap, but not on stack due to big array. For example below code will get core dump on Mac (default max stack size is 8MB) and Linux (default max stack size is 10MB) because of 'A a;'
#include <iostream>
#include <array>
struct A {
std::array<int, 1<<22> mem;
};
int main() {
auto* p = new A;
A a;
std::cout << "done" << std::endl;
}
Typically a process' stack size is quite small (a few mega bytes). For example, it's 8MB on Mac. Think we can increase that, but it's not ideal if a program has 10s or 100s threads because each thread will consume that amount of memory reserved for stack.
The text was updated successfully, but these errors were encountered: