rebello78
(usa Ubuntu)
Enviado em 28/08/2012 - 12:28h
Eu compilo direto com o makefile, logo compilo todo o código
all:
gcc -c pqa.c
gcc -c headQ.c
gcc -c lista.c
gcc -Wall -lm -O1 -g -o main main.c pqa.o headQ.o lista.o
Percebi agora que se eu usar o valgrind apesar dos erros ele roda e dá a resposta certa só que mostra os erros...
Se rodar sem o valgrind dá a mensagem já citada acima...
No fim do arquivo de erros mostra uma linha escrita "Solucao" que é a solução do meu problema.
Se rodar no 32 bits dá a mesma reposta sem os erros. Pelo relatório de erros abaixo dá pra ver que o problema é na alocação o que é estranho que no de 32bits aloca sem problemas.
==3605== Memcheck, a memory error detector
==3605== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==3605== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==3605== Command: ./main chr12a.dat
==3605==
==3605== Invalid write of size 8
==3605== at 0x401055: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605== Address 0x51ef570 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401065: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605== Address 0x51ef570 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x4011AB: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605== Address 0x51ef570 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid write of size 8
==3605== at 0x401055: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401261: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605== Address 0x51faf20 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401261: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401065: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401261: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605== Address 0x51faf20 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401261: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x40127F: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605== Address 0x51faf20 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401261: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid write of size 8
==3605== at 0x401055: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401C72: construirHeadQ (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400833: main (main.c:45)
==3605== Address 0x52069e0 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401C72: construirHeadQ (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400833: main (main.c:45)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401065: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401C72: construirHeadQ (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400833: main (main.c:45)
==3605== Address 0x52069e0 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401C72: construirHeadQ (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400833: main (main.c:45)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401D05: construirHeadQ (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400833: main (main.c:45)
==3605== Address 0x52069e0 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401C72: construirHeadQ (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400833: main (main.c:45)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401CD4: construirHeadQ (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400833: main (main.c:45)
==3605== Address 0x52069e0 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401C72: construirHeadQ (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400833: main (main.c:45)
==3605==
==3605== Invalid read of size 8
==3605== at 0x400E96: preencherVetor (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400866: main (main.c:55)
==3605== Address 0x51faf20 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401261: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x400E96: preencherVetor (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400931: main (main.c:66)
==3605== Address 0x51ef570 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x400F9B: liberarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400A0D: main (main.c:86)
==3605== Address 0x52069e0 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401C72: construirHeadQ (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400833: main (main.c:45)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401A89: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x4019B1: gerarFiOtimizada (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400A4D: main (main.c:98)
==3605== Address 0x51ef570 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401ABE: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x4019B1: gerarFiOtimizada (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400A4D: main (main.c:98)
==3605== Address 0x51faf20 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401261: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401ABE: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401573: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400A5A: main (main.c:102)
==3605== Address 0x51faf48 is not stack'd, malloc'd or (recently) free'd
==3605==
==3605== Invalid read of size 8
==3605== at 0x401A89: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401573: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400A5A: main (main.c:102)
==3605== Address 0x51ef570 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401ABE: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401645: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400A5A: main (main.c:102)
==3605== Address 0x51faf48 is not stack'd, malloc'd or (recently) free'd
==3605==
==3605== Invalid read of size 8
==3605== at 0x401A89: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401645: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400A5A: main (main.c:102)
==3605== Address 0x51ef570 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401ABE: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401573: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400AA2: main (main.c:111)
==3605== Address 0x51faf28 is 8 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401261: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401A89: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401573: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400AA2: main (main.c:111)
==3605== Address 0x51ef570 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401ABE: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x4016E2: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400AA2: main (main.c:111)
==3605== Address 0x51faf28 is 8 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x401261: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401A89: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x4016E2: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400AA2: main (main.c:111)
==3605== Address 0x51ef570 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401ABE: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x4013E1: calcularProfundidade (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40177C: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400AA2: main (main.c:111)
==3605== Address 0x51faf40 is not stack'd, malloc'd or (recently) free'd
==3605==
==3605== Invalid read of size 8
==3605== at 0x401A89: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x4013E1: calcularProfundidade (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40177C: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400AA2: main (main.c:111)
==3605== Address 0x51ef570 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401ABE: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x4013E1: calcularProfundidade (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40146F: calcularProfundidade (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40177C: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400AA2: main (main.c:111)
==3605== Address 0x51faf40 is not stack'd, malloc'd or (recently) free'd
==3605==
==3605== Invalid read of size 8
==3605== at 0x401A89: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x4013E1: calcularProfundidade (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40146F: calcularProfundidade (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40177C: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400AA2: main (main.c:111)
==3605== Address 0x51ef570 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605== Invalid read of size 8
==3605== at 0x401ABE: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x4013E1: calcularProfundidade (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40146F: calcularProfundidade (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40146F: calcularProfundidade (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40177C: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400AA2: main (main.c:111)
==3605== Address 0x51faf40 is not stack'd, malloc'd or (recently) free'd
==3605==
==3605== Invalid read of size 8
==3605== at 0x401A89: calcularCusto (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x4013E1: calcularProfundidade (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40146F: calcularProfundidade (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40146F: calcularProfundidade (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40177C: _2_Troca (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400AA2: main (main.c:111)
==3605== Address 0x51ef570 is 0 bytes after a block of size 48 alloc'd
==3605== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3605== by 0x401005: alocarMatrizInt (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x40118D: copiarArq (in /home/jones/Dropbox/2012/ufes_mestrado/2012-1/Estudo Dirigido 2/implementacao/headQ/bkpGraspPQA/19-07-12/main)
==3605== by 0x400829: main (main.c:38)
==3605==
==3605==
==3605== More than 10000000 total errors detected. I'm not reporting any more.
==3605== Final error counts will be inaccurate. Go fix your program!
==3605== Rerun with --error-limit=no to disable this cutoff. Note
==3605== that errors may occur in your program without prior warning from
==3605== Valgrind, because errors are no longer being displayed.
==3605==
Menor Custo: 9552.00
Solucao: 7 5 12 2 1 3 9 11 10 6 8 4
==3605==
==3605== HEAP SUMMARY:
==3605== in use at exit: 0 bytes in 0 blocks
==3605== total heap usage: 6,365 allocs, 6,365 frees, 351,184 bytes allocated
==3605==
==3605== All heap blocks were freed -- no leaks are possible
==3605==
==3605== For counts of detected and suppressed errors, rerun with: -v
==3605== ERROR SUMMARY: 10000000 errors from 29 contexts (suppressed: 2 from 2)