Heob을 사용하여 메모리 누수 감지

Windows에서는 Heob 힙 관찰기를 사용하여 버퍼 오버런 및 메모리 누수를 감지하세요.

현재 열려 있는 프로젝트에서 Heob을 실행하려면:

  1. Analyze > Heob 을 선택합니다.

    Heob 설정

  2. 사용할 Heob 설정 프로필을 선택하거나, ‘ New ’를 선택하여 새 프로필을 생성합니다.
  3. ' Heob path'에서 Heob 실행 파일의 경로를 입력합니다.
  4. 검사를 실행하기 위한 설정을 지정합니다.
  5. OK 을 선택하여 Heob를 실행합니다.

Qt Creator 응용 프로그램을 실행한 다음, 터미널에서 Heob를 실행합니다.

터미널에서 실행 중인 Heob

Heob는 버퍼 오버런 시 액세스 위반을 발생시키고, 문제를 일으킨 명령어와 버퍼 할당에 대한 스택 트레이스를 기록합니다. Heob가 정상적으로 종료된 후 ‘ Memcheck ’ 뷰에서 결과를 확인할 수 있습니다.

Memcheck 보기에서 Heob의 결과

참조: 방법: 분석, 분석기, Heob코드 분석.

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.