(4.4.0) Memory leak?

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Kizoky
Posts: 291
Joined: Mon Nov 14, 2011 9:59 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Around weirdos, I'm the biggest weirdo among them
Contact:

(4.4.0) Memory leak?

Post by Kizoky »

in GZDoom 4.3.1 in one of my maps the average RAM usage is around 1400-1700mb

in 4.4.0 however, it increases to 5000mbs

You can find my mod here: https://www.moddb.com/mods/postal-share ... -tech-demo
or from here: https://github.com/Kizoky/share-the-doo ... master.zip

Reproduce:
- go to world1
- game has to be unpaused
- check in task manager as the memory usage increases overtime

Extra info:
- I use Vulkan
- I maxed out every settings (bloom, FXAA, etc..)
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: (4.4.0) Memory leak?

Post by drfrag »

Something similar happened with PB 3.0 but i thought it was a mod bug. But for that one the problem was reported to appear in 4.3.3, could you check with that version? I only have 4 GB of ram.
For PB 3 inferno city on a recent devbuild i wrote:
drfrag wrote:Here memory consumption rises up to 2 GB several times and then goes down to 700 MB, and once to as low as 200 MB. That's okay but when i tried to quit and usage was still relatively low it skyrocketed and freezed the machine for 15 minutes. It was so badly frozen that the task manager didn't even update (it showed around 1.4 GB as last value). I clicked on the window several times and luckily the dialogue to terminate the process appeared and i managed to kill it but only after the screen went black and the desktop came back again.
User avatar
Kizoky
Posts: 291
Joined: Mon Nov 14, 2011 9:59 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Around weirdos, I'm the biggest weirdo among them
Contact:

Re: (4.4.0) Memory leak?

Post by Kizoky »

drfrag wrote:Something similar happened with PB 3.0 but i thought it was a mod bug. But for that one the problem was reported to appear in 4.3.3, could you check with that version? I only have 4 GB of ram.
For PB 3 inferno city on a recent devbuild i wrote:
drfrag wrote:Here memory consumption rises up to 2 GB several times and then goes down to 700 MB, and once to as low as 200 MB. That's okay but when i tried to quit and usage was still relatively low it skyrocketed and freezed the machine for 15 minutes. It was so badly frozen that the task manager didn't even update (it showed around 1.4 GB as last value). I clicked on the window several times and luckily the dialogue to terminate the process appeared and i managed to kill it but only after the screen went black and the desktop came back again.
nope, I tested with 4.3.3 and the problem that I encountered in 4.4.0 doesn't appear there
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: (4.4.0) Memory leak?

Post by drfrag »

It might be unrelated and that PB one could indeed be a mod bug. One thing i've noticed is that now GZDoom takes more ram than LZDoom, at least since 4.3.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: (4.4.0) Memory leak?

Post by _mental_ »

The problem is with garbage collector. M_Malloc() no longer adds requested size to GC::AllocBytes, so GC doesn't run when needed. With the recent backend unification, I'm not quite sure where this variable should to be adjusted.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49072
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: (4.4.0) Memory leak?

Post by Graf Zahl »

Put it back in there. This looks like during the file sync process the wrong code was chosen at one time.
This still begs the question: Does it make sense to measure all allocations, not just the ones related to GC'd objects? I never fully understood how this was supposed to work.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: (4.4.0) Memory leak?

Post by _mental_ »

Fixed.

Regarding allocated memory measurement, IMHO the idea is to include everything in order to work within limited memory footprint.
Embedded system (mobile, console, anything else without virtual memory) can benefit from this approach. But this is only a guess.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: (4.4.0) Memory leak?

Post by drfrag »

drfrag wrote:looks like there's a memory leak in the garbage collector
So in the end it was a bug, that was what i suspected first but then i thought it was a mod bug.
Post Reply

Return to “Closed Bugs [GZDoom]”