Open Bug 1898039 Opened 1 year ago

Consider on-demand mapping of stack memory for lazy growing

Categories

(Core :: JavaScript: WebAssembly, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: rhunt, Unassigned)

References

(Blocks 1 open bug)

Details

Right now we unconditionally reserve and commit a full 1MiB of memory for each suspendable stack. We could instead reserve the 1 MiB of memory and only commit more memory once the stack has grown into it. We'd need some growth strategy for choosing the increments of pages we commit. Once we reach the end of the 1 MiB reservation, we could attempt to reserve another contiguous region and then continue growing if we succeed.

I think we could re-use the stack limit check to implement this growing routine.

This would be sort of a middle ground between our current approach, and full segmented stacks.

You need to log in before you can comment on or make changes to this bug.