문제

I use linux command top to observe a program running and I can see increasing memory used by that program.

How to figure out that symptom is caused by memory leak or memory fragmentation?

도움이 되었습니까?

해결책

Well, you can't do it using "top" command. The only way to detect memory leaks is by using special debugging tools called memory debugger. One example is "Valgrind" but there are many of them.

Another consideration is what is the program language of the program. If it is some modern script language with garbage collector - the memory leaks are not possible at all (of course if the language interpreter/compiler is not buggy).

Mostly the compiled, relatively low level languages are prone to memory leaks - like C, C++, Pascal, Assembly and similar.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top