티스토리 뷰

E T C

Dmalloc 사용법

hoojiv 2008. 11. 7. 22:08
SMALL

  http://dmalloc.com/releases/ 에서 압축파일을 다운로드 

  다운받은 파일의 압축을 푼다.

 압축푼 폴더로 이동하여 설치를 진행한다.

        ./configure


 make


 make install


 dmalloc 설정

 dmalloc -l ./logfile -i 100 high > dmalloc_setup


  source dmalloc_setup


 예제프로그램 (test.c)



 컴파일 > gcc -g -o test test.c -ldmalloc


 실행 > ./test        <- 이 때 logfile이 생성

 확인 > vi logfile


 Dumping Not-Freed Pointers Changed Since Start: <- free 안된 메모리가 있음을 의미
 not freed: '0xeecfe8|s1' (10bytes) from 'test.c:6' <- test.c의 6번째 라인에..
 10 1 Total of 1 <- free 안된 것이 1개 있음 .. 


  dmalloc 설치 완료 !! 
LIST
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함