(obsolete) Update TBB, dependencies and alandtse CommonLibSSE-NG#69
(obsolete) Update TBB, dependencies and alandtse CommonLibSSE-NG#69AndbGame wants to merge 11 commits intoaers:masterfrom
Conversation
|
Ok. after deeper investigate and testing, looks I am stuck for select better version of tbbmalloc
I am personally now playing/testing with rpmalloc instead tbbmalloc (AndbGame#2)
Therefore, I will leave this MR at your discretion - it can at least be useful for switching to alandtse CommonLibSSE-NG, but at the moment I have no idea which library (and which version) to select for memory allocation. |
Not resolved |
|
also added debug log - 32651b1 to at least detect the problem area in |
|
Hey We talked in discord so you know I've rewritten EF myself to use newer commonlib etc, but leaving this PR open for now to discuss some stuff With regards to form cache, I think it will probably be safe if the form is verified to have the correct formid (like you did in the debug log), and also clear cache entirely on load game start using skse load event. For double frees I don't really have a solution outside of try and fix them in Skyrim's code, but that requires tracking them down. The project now has a cmake preset for using tbb and not using tbb (which just uses crt malloc). With a large modlist, tbb's malloc reduced my startup time by 13% from 107 seconds to 95 seconds, so there's definitely some benefit in continuing to include it. I am curious what happens with double frees using system alloc, Wish there was a way to trigger it reliably. One thing to note is that Skyrim's default memory manager simply allocs a large heap and then manages the heap internally and no longer makes calls to malloc/free. This obviously means that if Skyrim has use after free or heap overflows it won't crash because the allocated memory still exists, it will just end up with undefined behavior. The EF memory manager replacement actually causes the game to crash without EF's other fixes (see MemoryAccessErrors) because of this. I'd love to be able to track down any other such errors in the game but it's difficult if they're rare. |


For now it is just experiment. For discussion, review, testing.
Main goal: an attempt to solve the CTD like
have suspicion that tbbmalloc (v2020.3) has thread race, I am found some fixes in (v2021.11.0)
I am already have few positive feedbacks, that this resolve such CTD (some guys very often encountered such a crash when loading some of his saves. so maybe the experiment was not in vain). And testing in real gameplay still in progress