How to use the memory allocator patch?

Tips for additional stability:

Data/SKSE/SKSE.ini (not needed if UseOSAllocators=1 in CrashFixPlugin.ini):

Set DefaultHeapInitialAllocMB:Memory to 768. If you are using a lot of mods or higher uGrid than 5 then set 1024. Helps with CTD during save load, especially if you can load the save after qasmoke. Max value is 1280. If you are using ENB you may get CTD on startup with higher value than 768 and ExpandSystemMemoryX64 true in enblocal.ini!

to 768. If you are using a lot of mods or higher uGrid than 5 then set 1024. Helps with CTD during save load, especially if you can load the save after qasmoke. Max value is 1280. If you are using ENB you may get CTD on startup with higher value than 768 and ExpandSystemMemoryX64 true in enblocal.ini! Set ScrapHeapSizeMB:Memory to 256. Game can't use more than 256 of this and setting higher serves no purpose.

Skyrim.ini:

uExterior Cell Buffer:General - setting this too high causes crashes more, especially when game wants to unload many cells at once. If you set 0 or just remove it from your INI then game decides this and that's the best way.

- setting this too high causes crashes more, especially when game wants to unload many cells at once. If you set 0 or just remove it from your INI then game decides this and that's the best way. bPreemptivelyUnloadCells:General - setting this 1 will mean game purges cell buffers and unload cell whenever it is possible. Default is 0 which means keep cell in memory until we need the space for other cells. I find 0 to be better, there's no reason to unload cell immediately, the buffer was implemented for a reason.

- setting this 1 will mean game purges cell buffers and unload cell whenever it is possible. Default is 0 which means keep cell in memory until we need the space for other cells. I find 0 to be better, there's no reason to unload cell immediately, the buffer was implemented for a reason. fPostLoadUpdateTimeMS:Papyrus - setting higher will cause longer loading. Mine is 500, seems to work well for me. You can try 750 or even 1000+ if you have a lot of script-heavy mods.

- setting higher will cause longer loading. Mine is 500, seems to work well for me. You can try 750 or even 1000+ if you have a lot of script-heavy mods. fUpdateBudgetMS:Papyrus - remove (this sets to default 1.2). If you have a lot of script heavy mods and a good PC you can set higher for example 2.0, however this can reduce your FPS when a lot of things are happening.

- remove (this sets to default 1.2). If you have a lot of script heavy mods and a good PC you can set higher for example 2.0, however this can reduce your FPS when a lot of things are happening. fExtraTaskletBudgetMS:Papyrus - remove (this sets to default 1.2). See above.

- remove (this sets to default 1.2). See above. bEnableLogging:Papyrus - set 0. There's no reason to log papyrus unless you are developing a mod. Writing to file constantly is not good for performance. Papyrus logs have nothing to do with finding causes for crashes, although you can use this to find misbehaving mod scripts which can be helpful, I'd recommend to disable it for normal gameplay though.

- set 0. There's no reason to log papyrus unless you are developing a mod. Writing to file constantly is not good for performance. Papyrus logs have nothing to do with finding causes for crashes, although you can use this to find misbehaving mod scripts which can be helpful, I'd recommend to disable it for normal gameplay though. bEnableTrace:Papyrus - set 0. See above.

- set 0. See above. Any other papyrus setting - delete. Changing the papyrus from default will just cause instability or lagged scripts.

- delete. Changing the papyrus from default will just cause instability or lagged scripts. iPresentInterval:Display - VSync enabled or disabled. You shouldn't need to change this as default value is 1 and that's good.

Safety Load (not needed if UseOSAllocators=1 in CrashFixPlugin.ini):

Stable uGridsToLoad:

ENB:

Bashed Patch:

LOOT:

TES5Edit cleaning:

Playthrough:

Common issues:

Changelog

12 - 28/08/2016

Errors or warnings from Crash Fixes is now also logged to file - enabled by default. The file appears in Data/SKSE/Plugins/CrashFixPluginLog.txt

Added automatic crash dump analysis, disabled by default. It creates files in Data/SKSE/Plugins/CrashLog/crash_timestamp.txt

Warn user if they have bad ENB settings on startup.

Added a crash fix related to Enderal.

Added a crash fix related to magic effects list.

Skyrim will display warning if actor has unexpectedly NULL TESCombatStyle form. It tries to display the actor form ID so you can check it out yourself.

Changed a bit how the corrupt NIF crash is detected, it might help avoid some false positives.

Show

11 - 29/06/2016

Added a message to help track down crashes that may be caused by a corrupted NIF.

Changed how the message boxes are displayed if Crash Fixes wants to display a message. Maybe it helps a bit with the problem where message goes behind the game's screen and can't see it? Report in comments, for me it works. Also the message boxes from this mod now clearly say they are from this mod.

Added couple more null pointer check patches.

Added a message when failed to allocate a texture, usually because of running out of VRAM.

Added a custom implementation of block allocator for very small allocations. This may help reduce fragmentation but does not eliminate it. Disabled by default. Read the INI for more information.

10 - 21/05/2016

Compatibility with SKSE Plugin Preloader for malloc patch. http://www.nexusmods.com/skyrim/mods/75795/?

9 - 20/05/2016

Fixed actor value fix not working.

Added fix to manually patch movaps when AlignHeapAllocate is disabled.

Removed one option that didn't do anything in the end.

Extended one magic effect projectile fix to apply to all uses of that function.

Fixed save game string count 65536 fix didn't work completely.

AlignHeapAllocate fix is now disabled by default, too many people didn't like the downside of longer loading and more memory usage.

Added option to completely disable Skyrim's memory allocation system and use regular C malloc. Currently not possible to enable since I don't have permission to upload the modified skse_steam_loader.dll

8 - 03/05/2016

Added fix for more than 65535 strings in save game.

Added warning message if your SKSE memory patch is not active.

7 - 28/04/2016

Added 2 more fixes.

Added 1 more crash with message about what may be causing it.

6 - 25/01/2016

Adjusted StrCmp fix, should detect crash better.

Added 2 more error messages when specific crashes happen to let user know what they could try.

Tried to make INI explanations a little bit better.

5 - 20/01/2016

Added 2 more possible fixes. See last 2 entries of INI file or readme.

4 - 17/01/2016

Fixed another crash related to memory alignment. See last INI entry for details.

3 - 10/01/2016

Adjusted memory alignment fix code a bit.

Added 1 more possible fix reported in how to debug thread.

2 - 05/01/2016

Removed all the deadlock stuff.

Spoiler:

Made a plugin to help try and fix some of the crashes I've been seeing in http://www.loverslab.com/topic/46913-how-to-debug-ctd/ . You can turn each individual fix on / off in the, default settings recommended but if you have problems with something and you know what you're doing you can change. If you want to see exactly what crashes are fixed (with addresses) and a small explanation of my best understanding of the crash then check the INI file or readme on the nexus mod page.This plugin is meant to fix some common crashes AFTER you have followed STEP guides and sensible modding rules! It does not fix problems that come from modding irresponsibly or conflicts between mods.1. Open CrashFixPlugin.ini and find "UseOSAllocators=0"2. Change it to "UseOSAllocators=1"3. Download and install SKSE Plugin Preloader 4. Start game, if you get an error saying that memory patch could not be applied read the message for help, otherwise you're good to go.(5.) Causes game to crash and you use ENB? Set ExpandSystemMemoryX64=false in enblocal.ini(6.) Causes game to crash more frequently (especially with UNP RaceMenu sliders)? Try AlignHeapAllocate=1 in CrashFixPlugin.ini(These are things I've observed and Not 100% fact!)If you don't have some lines listed below in your INI it means they are set to default value.Install Safety Load if you have a infinite loading screen or freeze at any point. It fixes a bug in memory allocation that causes deadlock. Yes you still need this if you have SKSE memory patch, no they don't do the same thing. SKSE memory patch hides the problem of deadlock for longer because it allocates a larger memory block. If you don't have freeze or infinite loading screen at all then you don't need this!Don't use this. It causes memory corruption and does nothing unless you are changing your uGridsToLoad setting in INI often (I don't know why you would).I'm not an expert in ENB, but these two I recommend in enblocal.ini:ExpandSystemMemoryX64=falseReduceSystemMemoryUsage=trueYou should make this. It helps resolve a lot of conflicts between mods, especially related to leveled lists which can be a big problem. If there are no conflicts this doesn't really do any harm but even a small mod list usually has some.LOOT can be a good tool to help resolve issues with ordering, but it is not perfect, sometimes it places mods incorrectly, use your best judgement. LOOT can also warn you about other potential problems with mods.Do this! LOOT can tell you which mods need cleaning.Don't install or uninstall mods (with ESP files) in the middle of playthrough. Even changing the order can be very bad, especially if you use bashed patch or anything with SkyProc (requiem, perkus maximus). This of course applies to ESP files! Graphics mods and pure SKSE plugins are fine most of the time.Set AlignHeapAllocate=1 in CrashFixPlugin.ini, downside is increased load time and increased memory usage.Set ExpandSystemMemoryX64=false in enblocal.iniSet ReduceSystemMemoryUsage=true in enblocal.iniSet ExpandSystemMemoryX64=false in enblocal.iniCheck out my other mod Bug fixes.