CS(computer science)

linux - 메모리 릭 확인하는 법[쉘, 리눅스, do leaks]

ebang 2022. 11. 29. 11:25
반응형

 

 

while true; do leaks [프로그램명] && sleep 1; done

 

명령어로 leak 검사를 수행하도록 할 수 있다.

 

 

 

이렇게  프로그램 종료 전에 while(1);을 넣고,

이것저것 테스트 해보면서 릭이 나는지 확인할 수 있다!

 

 

 

* leak이 날 때는 확인을 어떻게 할까?

https://stackoverflow.com/questions/59122213/how-to-use-leaks-command-line-tool-to-find-memory-leaks

반응형