c - segmentation fault / malloc error? -
edit: problem solved, all so i'm writing code final piece of c coursework. i've written function fastdfs carries out fourier transform. following code supposed time process different input sizes. #include <stdio.h> #include <stdlib.h> #include <complex.h> #include <math.h> #include <time.h> void fastdfs(complex double *, complex double *, complex double *, complex double *, int, int); void print_complex_vector(complex double *, int); void free_complex_vector(complex double *); complex double *make_complex_vector(int); complex double *makewpowers(int); int main(void) { int i,n, operations_required; int index_counter = 1; double initial_time, final_time, time_taken, mega_flops_rate; complex double *mega_flops_vector = make_complex_vector(21); for(n = 2; n <= pow(2,20); n = n * 2) { complex double *wp = makewpowers(n); complex double *y = make_complex_vector(n); complex double *x = make_