Skip to content

Use member non-pointer declarations in Py*State structs instead of heap-allocated pointers. #79

Closed
@ericsnowcurrently

Description

@ericsnowcurrently

The full runtime state of a cpython process is found in PyRuntimeState, PyInterpreterState, and PyThreadState(and, for now, a bunch of static variables), which currently form a single tree at runtime under the_PyRuntime` global variable. Currently these three structs hold many pointers, which are (allocated and) populated during runtime initialization.

For most of the pointers we could instead replace them with static declarations (of the the corresponding data) in the relevant Py*State structs. (This wouldn't work for any variables where the size isn't fixed at compile time (e.g. PyVarObject) but it should work for most.)

Benefits

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions