A Memory Leak Fix!

Is it a memory leak? Hmm or just a pc system setting mismatch?

Last night I found a Reddit post on the current and long reported ‘memory leak’ problem in Diablo 4 & as a new player I experienced my first of many virtual memory errors that required a restart.
First off, this is not a fix discovered by myself & I forget the Reddit posters name so I am very sorry for not adding any accolades to that person but, I did want to share this fix that helped me and many others!

The problem seems to be a setting in players ‘Advanced System Settings’ in relation to allocated file sizes.
Follow these steps & you should have No more random virtual memory errors.
This is what was posted but, you want to make a change than Apply the changes, you will than be prompted to do a pc restart.

Original:
Advanced System Settings > Advanced Tab > Performance Tab > Advanced Tab > Change > Select drive D4 is installed on > Click System Managed Size > Click Set & Ok all the way out.

Instead please follow this (subtle but important changes):
Advanced System Settings > Advanced Tab > Performance Settings > Advanced Tab > Change > *Click Custom Size- Initial (MB) & Maximum Size (MB): fill in both spaces with the Max MB of your Memory Ram ie. I currently have 32gb of Ram so I inputed: 32000 into both fields!!
If you have 16gb Ram = 16000 / 64gb Ram = 64000 etc…
Click Set > Click Ok > Click Apply > Click Ok.
You will be prompted to Restart your PC.

  • I would double check that your changes were saved by following the above back to the Performance Settings/Advanced page, bottom of the page will show your:
  • Virtual Memory: Total paging file size for all drives = your Max Ram in MB’s (16000/32000/64000 etc…)
    If correct, you are good to go, happy days again :slight_smile:
    If it didn’t save your changes, re follow the steps above and it should save the changes after restarting your PC again (I had to do it twice also).

Hope this helps other players with there Virtual Memory crashes.
Lastly, I also suggest checking for Graphics Card Updates which should be taken care of regulary anyways :smiling_face:

DeadClocks

EDIT: I just found the Reddit Post I referred to in this post.
The Poster & original solution sharer to this problem was:
5tyhnmik, a 2yr old post but it was the fix/work around that mattered.

4 Likes

Yeah, the game is a virtual memory hog. There’s a second option related to this called “DirectStorage” which allows the video driver a way to bypass some memory bandwidth issues. IIRC it allows drivers to directly load textures and assets into video memory without going thru system memory first. Unfortunately it’s a real “hit or miss” thing on the stability side at least with Diablo 4. If you’ve optimized your page file and are still having issues try disabling the feature. Simply add “-disableds” to the launch command for the game.

Lastly, a word of caution on drivers, do NOT always upgrade to the “latest” you need to check what the latest stable driver is. There was an issue with some recent nVidia drivers causing issues in October for example.

1 Like

This is not a solution. It just potentially extends the amount of time before a crash or blue screen due to the memory leak spilling out until the pagefile is full. The issue is with the game. The developers are the only ones who can fix it. The problem is they are not actually skilled enough to fix it, and are too narcissistic to even admit it is caused by them.

All these steps are doing is having you set a fixed pagefile size, and making it much larger than it should need to be for any game or application to function properly. This should never “need” to be done by the “user”. Windows automatically governing the pagefile should ALWAYS be sufficient if the game/application is actually coded properly.

7 Likes

This should be set for any performance intensive game to 1.5x-2x your physical memory.
It is called setting the environment variables pagefile setting and has been suggested here by many people.

This alone will not fix the problem for everyone.

2 Likes

I have several SSD hard drives. I manually allocated 1TB of virtual mem each on 2 separate drives along with the Nvidia 561.09 driver (RTX4080, Intel 13900, 64GB ram) and the game has been stable. I can play for 8 hours+ straight with no issues. Prior to this I would CTD about every hour. I had no issues with game crashes until the expansion. I made both changes at the same time so I cannot say which one solved the issue. I am leaning towards the VM change but it was most likely a combo of both.

Good to know, I’m still a novice when it comes to understanding & solving pc issues that pop up when gaming but after trying it & the game running steadily for hours last night & today, I thought I would atleast share it in a new thread.
I totally agree with you after some thinking on it & it makes sense that it would only be slowing the issue down.
I’ll take the longer play times per restart needed/per virtual memory errors while I go blue in the face in hopes of it getting fixed by the Devs…
Thanks for your reply Jemuzu :+1:

1 Like

It might help, but the problem is how their coding is storing, freeing, and accessing memory and pagefile. They know this. That’s why there have been soooooooooooo many patches this season. They are plugging memory leaks as they find them.

1 Like

It’s possible the developers are competent but they’re given lousy goals to work towards. There doesn’t seem to be any effort from on high to deal with long standing issues like broken quests. I just ran into this trying to clear the Stockade dungeon.

In the second zone where you’re supposed to collect Animus I killed every monster (I had Subo so I know I got them all) and I was missing one carrier’s worth of animus. I walked around the entire dungeon two times looking for some that might’ve dropped but I somehow missed and nothing. I had to abandon the dungeon since there was no way to fill the vessel and unlock the end boss.

How? How, after 18 months, is it possible for a basic quest mechanic to be broken like that? The answer seems fairly obvious – nobody at Blizzard cares about the quality of the game. As long as it boots (most of the time) and the store sells things for real money they’re happy. It’s why we got patches like the DLSS Debacle that took 2 weeks to resolve. Or why many PS5 players couldn’t even launch after a different patch. Basic “is it plugged in” type checks don’t happen in QA (if there even IS a QA team) because quality is not the goal.

1 Like

Irrational flashback to Stormwind

Please, fix. This problem never happened to me in previous season. 32GB DDR4 here

2 Likes

That game has some issues with DX12 and Vulkan causing crashing also, but not nearly as frequent and I think they are fixing them as it has happened a lot less than the first few days.

:exploding_head:Wow that appears to be something a PC Master Repairmen might

try! I’m gonna have to wait n see if or when Buzzard comes up with

something

:unamused:

There is no memory leak in D4…All the leaks come from using unorthodox softwares that are unable to provide sustainable performance.

Nonsense, I never had issues regarding this.
What now sherlock?