I got segmentation fault at a=1. May I know why is this so? I'm planning to use realloc instead of malloc because *a is a buffer which will be placed in a FOR loop and its size will constantly change.Code:
realloc(a, sizeof(int *));
a = 1;
Any help will be much appreciated! :D
Lastly, is there any good performance analysis tools in Linux that can measure cache misses, disk read, etc occuring in the program that I created?