Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forget_memory opcode #53

Merged
merged 3 commits into from
Jan 6, 2024
Merged

forget_memory opcode #53

merged 3 commits into from
Jan 6, 2024

Conversation

MiranDMC
Copy link
Collaborator

@MiranDMC MiranDMC commented Dec 23, 2023

New opcode for removing memory blocks allocated with 0A8C from clean-up list used when starting new game/loading save.
Added virtual protect configuration to 0A8C, to allow hosting executable code.

2004=1, forget_memory %1d%

@MiranDMC MiranDMC changed the title allocate_memory_persistent opcode implemented. allocate_memory_persistent opcode Dec 23, 2023
@MiranDMC MiranDMC marked this pull request as draft January 2, 2024 20:37
@MiranDMC MiranDMC force-pushed the opcode_alloc_memory_persistent branch from 7260bd0 to 58e57d0 Compare January 6, 2024 10:33
@MiranDMC MiranDMC force-pushed the opcode_alloc_memory_persistent branch from 58e57d0 to d846e70 Compare January 6, 2024 10:34
@MiranDMC MiranDMC changed the title allocate_memory_persistent opcode forget_memory opcode Jan 6, 2024
@MiranDMC MiranDMC marked this pull request as ready for review January 6, 2024 10:35
@MiranDMC MiranDMC requested a review from x87 January 6, 2024 10:35
if (mem) GetInstance().OpcodeSystem.m_pAllocations.insert(mem);
DWORD size; *thread >> size;

void* mem = malloc(size);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we switch over to calloc here? I'm not sure how breaking this change might be, but I couldn't imagine any script specifically relying on uninitialized memory

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasonable. Updated.

@MiranDMC MiranDMC merged commit 2606b2e into master Jan 6, 2024
@MiranDMC MiranDMC deleted the opcode_alloc_memory_persistent branch January 6, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants