|
|
|
|
|
by ilammy
1229 days ago
|
|
Rust defaults loosely follow platform’s libc defaults for improved interoperation. On major platforms the default stack size is 2 megabytes of mapped address space. You can ask for less, but it gotta be explicit for every spawned thread. That’s mapped space, so depending on the OS it could be more or less friendly to its memory subsystem. Linux won’t bother finding you actual resident pages until you do need them. But if the stack drops back down, it will be swapped out as any other dirty memory. Rust does not do any MADV_DONTNEED magic behind your back to aid with reclaiming memory. |
|