Conversation

NFT profile picture
💯 > In general, it is my opinion that if your program is crashing on Alpine, it is because your program is dependent on behavior that is not guaranteed to actually exist, which means your program is not actually portable
Quote Tweet
understanding thread stack sizes and how alpine is different ariadne.space/2021/06/25/und
1
9
No, but it can use that much so it's accountable memory and requires backing space in memory or swap when memory accounting is enabled. The main thread stack works differently and doesn't actually map all the space at once. It gradually maps it in as the program uses the memory.
1
1
You can gradually read it in blocks based on the configured thread gap size to map it in when your process starts and then optionally add your own guard where you want the limit to be since the kernel doesn't necessarily even have a specific limit configured.
1
If the stack limit is set to unlimited, it allows it to grow to some arbitrary amount until it gets something else. Before they had the proper thread gap feature, this didn't work properly and you could just hit something else and overflow into it with no actual guaranteed guard.
1
Show replies