Skip to content

Don't switch to the C stack when there is room on the Rust stack #4480

Closed
@brson

Description

@brson

If there is sufficient room on the Rust stack to run a particular foreign function then we don't need to switch stacks. Each scheduler has a native stack size so we just need the Rust segment to be larger than that (and they can be much larger).

At that point we can annotate specific functions in core with their required stack size. It could significantly reduce the number of stack switches we do.

Metadata

Metadata

Assignees

Labels

A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsI-slowIssue: Problems and improvements with respect to performance of generated code.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions