[so] Curiozitate valgrind / exec

Dragos Tarcatu tarcatu_dragosh at yahoo.com
Sat Sep 25 10:18:16 EEST 2010


Salut,

Exemplul mai relevant in acest caz pare sa fie doar:

#include <unistd.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    char * command[] = {"ls", NULL};
    execvp("ls", command);
    return 0;
}

Cu alte cuvinte valgrind-ul pare sa raporteze memory leak doar la simpla 
folosire exec. De asemenea odata cu cresterea dimensiunii sirurilor din command 
creste si cantitatea de memorie raportata ca fiind pierduta. 


Dragos


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/lurker/list/so.html/attachments/20100925/67e491d6/attachment.htm>


More information about the so mailing list