Skip to content

Commit

Permalink
add stack reduce/restore
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxiujia committed Dec 13, 2023
1 parent 536d4eb commit ecd223a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ should follow when writing programs that use coroutines:
> but it's **safe** if your code is not sensitive about the previous state of TLS. Or there is no coroutines scheduling between **set** TLS and **use** TLS.
* Don't run CPU bound tasks for long time, but it's ok if you don't care about fairness;
* In most modern operating systems, when starting a process, the standard Thread stack size is usually 8 MB, and mco provides a maximum stack space of 6MB. Typically, operating systems load memory pages on demand, such as starting about 1 million processes on my Mac/Unix system, which requires 46GB of memory space. This means that a protocol requires a minimum of 50KB of stack space to be consumed until a maximum of 6MB of stack space is reached
* In most modern operating systems, when starting a process, the standard Thread stack size is usually 8 MB, and mco provides a maximum stack space of 6MB. Typically, operating systems load memory pages on demand, such as starting about 1 million processes on my Mac/Unix system, which requires 15GB of memory space.
* Don't exceed the coroutine stack. There is a guard page for each coroutine stack. When stack overflow occurs, it will
trigger segment fault error.
Expand Down

0 comments on commit ecd223a

Please sign in to comment.