Implement custom heap alloc code and pop it by implementing PMem_PopFromSource_NoDebug
Restarting a map on SP with numerous custom scripts can cause an out-of-memory error.
"Persona Non Grata"
[userraw.zip](/attachments/83a67eca-f74f-44d6-97d2-dbb4c31a4943)
💡 Idea from H1-Mod: https://github.com/auroramod/h1-mod/blob/develop/src/client/component/gsc/script_loading.cpp
Implement custom heap alloc code and pop it by implementing `PMem_PopFromSource_NoDebug`
Keep in mind, I also asked Claude sonnet to take a look at Grok's code and turns out it was matching more or less what H1 gave me via IDA's pseudo-code, so I checked manually that it did make sense, there are many projects that now use AI to decomp CoD so I think it's fair to let AI take a look at something and then check manually. (Would that take as much time as doing it yourself? I don't know but it's probably a moral booster if AI gives you clear code coming from IDA and then you just have to check if it does "make sense" all things considered. Anyhow, this issue was in the works for a year basically so nothing was rushed with AI.
Also, testing this was difficult, it appears no memory leak was found so far. It appears it was SP specific (Pluto IW5 uses the same code as iw5-mod for MP and no memory leak was ever found). This code will help make sure the GSC byte code is always unloaded manually on both SP and MP
Keep in mind, I also asked Claude sonnet to take a look at Grok's code and turns out it was matching more or less what H1 gave me via IDA's pseudo-code, so I checked manually that it did make sense, there are many projects that now use AI to decomp CoD so I think it's fair to let AI take a look at something and then check manually. (Would that take as much time as doing it yourself? I don't know but it's probably a moral booster if AI gives you clear code coming from IDA and then you just have to check if it does "make sense" all things considered. Anyhow, this issue was in the works for a year basically so nothing was rushed with AI.
Also, testing this was difficult, it appears no memory leak was found so far. It appears it was SP specific (Pluto IW5 uses the same code as iw5-mod for MP and no memory leak was ever found). This code will help make sure the GSC byte code is always unloaded manually on both SP and MP
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Restarting a map on SP with numerous custom scripts can cause an out-of-memory error.
"Persona Non Grata"
userraw.zip
💡 Idea from H1-Mod: https://github.com/auroramod/h1-mod/blob/develop/src/client/component/gsc/script_loading.cpp
Implement custom heap alloc code and pop it by implementing
PMem_PopFromSource_NoDebugI asked Grok 3 to backport S1/H1's version of the pop function
should be fixed as of today? do you know what day is today?
Keep in mind, I also asked Claude sonnet to take a look at Grok's code and turns out it was matching more or less what H1 gave me via IDA's pseudo-code, so I checked manually that it did make sense, there are many projects that now use AI to decomp CoD so I think it's fair to let AI take a look at something and then check manually. (Would that take as much time as doing it yourself? I don't know but it's probably a moral booster if AI gives you clear code coming from IDA and then you just have to check if it does "make sense" all things considered. Anyhow, this issue was in the works for a year basically so nothing was rushed with AI.
Also, testing this was difficult, it appears no memory leak was found so far. It appears it was SP specific (Pluto IW5 uses the same code as iw5-mod for MP and no memory leak was ever found). This code will help make sure the GSC byte code is always unloaded manually on both SP and MP