0

I have the service, that each second run external exe programs (for example process1.exe) and kill's them. Taskmgr - show only one process. After running service i get minimal free memory availability. Sum of all processes memory and total usage memory not equal. When i run RamMap processes i see a lot of expanding procces1.exe. Looks like killing process doesn't mean free it memory.

Can you advice windows soft for dead process memory leak detection?

Stepchik
  • 99
  • 4
  • 11

3 Answers3

2

Modern operating systems avoid freeing memory if they have any other choice. See this answer for more details. If the page is dirty, shared, or has a name in the filesystem, the page can still be accessed, so there is no need to make it free. Only if the page is both unshared and anonymous will it be freed.

David Schwartz
  • 31,215
  • 2
  • 53
  • 82
1

If you kill process, memory could be still occupied by the killed process, but if another running program/service will need it, it will be freed. You can use some software to automatically free your ram, but only think that it does is trying to use as much memory as it can, so the operating system will free it.

tikend
  • 109
  • 5
  • "but if another running program/service will need it, it will be freed"Two my server's (Windows server 2008r2 and Windows 2012) dies. It will not – Stepchik Jun 28 '13 at 08:11
  • you have set virtual memory on disk, which is very slow and if is used, os freeze with high probability. os will not free ram if it has other choice, as virtual memory on disk. – tikend Jun 28 '13 at 08:13
0

It seems that your service doesn't close a handle after it kills an external program. Another possible issue is a buggy driver. See also: RamMap shows millions of processes that Task manager doesn't (the answer of).

ruvim
  • 116
  • 1