search for: addandfree

Displaying 2 results from an estimated 2 matches for "addandfree".

2009 Mar 26
0
[LLVMdev] GSoC'09 question
...rovements would include a path viability check with a solver and some shape analysis. This summer however, I plan to create an "optimization" that automatically fixes memory leaks in programs - obviously only those that can be fixed with the available information, for example: int addAndFree(int *x, int y) { y += *x; free(x); return y; } int functionCalled10MTimesInSomeLoop(int index, int data[]) { int *x = (int*)malloc(sizeof(int)); if(index < 3) { // do stuff with x, index and data *x = data[index]; return addAndFree(x,index); } else return -1; } the function would no...
2009 Mar 26
3
[LLVMdev] GSoC'09 question - previous mail w/o html
...rovements would include a path viability check with a solver and some shape analysis. This summer however, I plan to create an "optimization" that automatically fixes memory leaks in programs - obviously only those that can be fixed with the available information, for example: int addAndFree(int *x, int y) { y += *x; free(x); return y; } int functionCalled10MTimesInSomeLoop(int index, int data[]) { int *x = (int*)malloc(sizeof(int)); if(index < 3) { // do stuff with x, index and data *x = data[index]; return addAndFree(x,index); } else return -1; } the function would no...