Skip to content

Trick C-string members are checkpointed straight-forward but become anonymous allocs after restart #1969

@excaliburtb

Description

@excaliburtb

A Trick C-string is checkpointed initially as the following:

trick_var.foo = "This is a C string";

when being restored, it has to be allocated and tracked so Trick uses TMM_strdup to restore it. The issue of annoyance is that the variable is now pointing to a dynamically allocated string so that if checkpointed again it'll be:

char trick_anon_local_1[19];

trick_Var.foo = &trick_anon_local_1;

this pushes all the allocation indices down however many of these exist. We deal with it of course but this may be fixable. Most of these variables are in C++ classes and need to simply be C++ strings if possible. Or, the variables could be named with automatic naming so that they don't contribute to the anonymous allocation count.

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