lich426 / FanCtrl

FanCtrl is a software that allows you to automatically control the fan speed on your PC.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memory leak?

ltguillaume opened this issue · comments

A possible memory leak has been mentioned already in #19, but that was on Windows 7. I am on Windows 10 x64 with the following hardware & settings:

image
image
image

FanCtrl uses up 14MB of memory upon start, then - without opening the GUI - steadily increases memory use with about 140-240KB per second.

I just updated to v1.4.4

Edit
It does seem to max out at about 38MB, though.

commented

um.. I don't think so

There was an issue with LHM, but it was resolved. (link)

C# programmers never do this directly, there is no delete keyword in the C# language. It relies on the garbage collector.

So you think it's just the garbage collector that allows memory use to go up to 38M before kicking in? And does your reply mean you don't see the steep incline of 140-240KB per second from start?

Mine climbs as you describe it, with my configuration (which is quite a lot more complex than yours) it's currently climbing from about 15.5MB to about 18.5, then it drops down to 15.5 and repeats.

This just looks like growing memory usage, which is not the same as a leak. A leak will fail to free the allocated memory after you quit. This is just allocating more memory, but it does so until a limit, and when you exit FanCtrl, the memory is freed. I don't see any sign of a memory leak here, just memory usage. I wonder why yours climbs to 38 and mine only about 18. Interesting, but I think everything seems to be working OK?

commented

The program starts various tasks on the background even if UI does not open.
Even UI is just a hidden state.
That's why the memory is increasing.
The released variable is managed by the garbage collector, so I don't know when it will be returned to the OS.
You'll find your memory usage decreasing over time using the program.

Yeah, I didn't realize that there was a point where the increase stopped until after I posted this. Nevertheless, I thought it was rather strange behavior considering there's no logging afaik and the amount the memory use is increased by every second is rather steep. By the way, it currently stops at 26MB, so it's rather random, too (but maybe that's due to what you said: " You'll find your memory usage decreasing over time using the program.")

@xcasxcursex I'm quite curious about your config, could you share some screenshots?

@xcasxcursex I'm quite curious about your config, could you share some screenshots?

I would be happy to but it would be a lot. I'm using two CPU temps (core and CCD Max), GPU temp (soon to be three when I add hotspot and VRAM), motherboard VRM, 4 DIMMs and 2 SSDs, and each addresses 6 fans with its own curve.... so yeh 60 pics! I used the preset save and load functionality a lot to get similar fan curves between different sensors, but there are small differences (like, each of my DIMMs has a 1C difference from the next) and large ones (like, the GPU fan for the GPU is what you'd expect, but I also can use the GPU fan to help cool the DIMMs, so there's a totally different GPU fan curve associated with each of the DIMM sensors and each of them is offset by 1C like above, just because that's how my DIMMs behave:
image

I also use the performance profile to just set them to 100% and never change, during gaming (setting fan speeds can effect frametimes - not a problem with this app just the nature of the way fans are set by any app)

Wow, that's impressive 😛 I'm not a gamer, I just use FanCtrl to silence the case a bit more than is possible from within the BIOS.

Wow, that's impressive stuck_out_tongue I'm not a gamer, I just use FanCtrl to silence the case a bit more than is possible from within the BIOS.

That's my main reason, too. I have to live and sleep next to this machine so that's why I have it tuned so precisely (like with my dimms), it's all about getting it as quiet as possible.
I use hysteresis too, so that it's not 'pumping' the fans during bursts of activity. Usually it's more pleasant to have it go 5-10% higher than needed for a little while, than to have it jumping up and down. Maybe you'll dig it too?

I'll have a look at it, makes sense to enable it.