3 ms·
> Setting up the MMU to know about that will take time and memory, though. Except you don't need to set it up until the page faults happen. You allocate the to
by addaon 3y ago
> Setting up the MMU to know about that will take time and memory, though.
Except you don't need to set it up until the page faults happen. You allocate the top-of-stack page in the MMU, probably physically map it (since it will be used when the task first executes), make a note in your memory mapping structures that all the rest is unmapped but mappable for this purpose, and when the stack-overflow page fault occurs, go in and add the page to the mapping.
If you're okay with this level of overcommitment of memory (and I'm not!), the page table management side of it is in the noise for performance and resource use.