Skip to content

stack-like coroutine frame memory allocation #222

Description

@microcai

when coro foo calls (or, precisely speeaking, awaits) bar, and bar awaits bob, the coro frame is allocated in foo, bar, bob order, and when their job done, the deallocating happens just in "reverse" order.

it works much like stacks, just with "final await to continuation ", not "ret".

logically speaking, it is a stack.

so, how about implementing promise type allocation with a stack like allocator ? And this allocator shall be "shared" with coroutines on the "same" call chain, aka, "a coperative user mode thread".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions