나는 다음과 같은 작은 에이다 프로그램이이 같은 Valgrind의를 통해에이다 작업 선언은 메모리 누수가 발생
gnatmake -g -gnatwI leaky_main.adb
을하고 실행 :
procedure Leaky_Main is
task Beer;
task body Beer is
begin
null;
end Beer;
begin
null;
end Leaky_Main;
모든 아주 기본적인,하지만를 내가 같이 컴파일 할 때 :
01 :valgrind --tool=memcheck -v --leak-check=full --read-var-info=yes --leak-check=full --show-reachable=yes ./leaky_main
나는 다음과 같은 오류 요약을 얻을
==2882== 2,104 bytes in 1 blocks are still reachable in loss record 1 of 1
==2882== at 0x4028876: malloc (vg_replace_malloc.c:236)
==2882== by 0x42AD3B8: __gnat_malloc (in /usr/lib/i386-linux-gnu/libgnat-4.4.so.1)
==2882== by 0x40615FF: system__task_primitives__operations__new_atcb (in /usr/lib/i386-linux-gnu/libgnarl-4.4.so.1)
==2882== by 0x406433C: system__tasking__initialize (in /usr/lib/i386-linux-gnu/libgnarl-4.4.so.1)
==2882== by 0x4063C86: system__tasking__initialization__init_rts (in /usr/lib/i386-linux-gnu/libgnarl-4.4.so.1)
==2882== by 0x4063DA6: system__tasking__initialization___elabb (in /usr/lib/i386-linux-gnu/libgnarl-4.4.so.1)
==2882== by 0x8049ADA: adainit (b~leaky_main.adb:142)
==2882== by 0x8049B7C: main (b~leaky_main.adb:189)
==2882==
==2882== LEAK SUMMARY:
==2882== definitely lost: 0 bytes in 0 blocks
==2882== indirectly lost: 0 bytes in 0 blocks
==2882== possibly lost: 0 bytes in 0 blocks
==2882== still reachable: 2,104 bytes in 1 blocks
==2882== suppressed: 0 bytes in 0 blocks
==2882==
==2882== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 21 from 6)
--2882--
--2882-- used_suppression: 21 U1004-ARM-_dl_relocate_object
==2882==
==2882== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 21 from 6)
이 오류가보고 된 이유는 누구입니까? Im 실제 누수가 없다는 것이 확실하지만, 왜 그런지/어떻게되는지 알고 싶습니다.
감사합니다.
어디서 오류가 있습니까? 0 오류, 0 바이트 손실 ... – oenone
@ 엔ONE : "여전히 도달 가능 : 1 블록에서 2,104 바이트" – NWS
어디에 문제가 있습니까? 메모리는 여전히 도달 할 수 있습니다. 그것은 오류가 아니며 그러한 것으로보고되지 않습니다. – oenone