Line 537: xi_sum = malloc(sizeof(*xi_sum)*nstates*nstates);
// sizeof(*xi_sum) is same as sizeof(float)
//xi_sum is a 2D array which is stored as 1D array
Line 336: memset(xi_sum 0, sizeof(float *)*nstates);
// xi_sum is initialized to zero, but it doesn't seem correct because it only initializes some bytes ( nstates size of pointer) of xi_sum array instead of whole array (nstates nstates * sizeof(float) )
File : main_bwa_hmm.c
Line 115:
float *xi_sum;
Line 537:
xi_sum = malloc(sizeof(*xi_sum)*nstates*nstates);
// sizeof(*xi_sum) is same as sizeof(float) //xi_sum is a 2D array which is stored as 1D arrayLine 336:
memset(xi_sum 0, sizeof(float *)*nstates);
// xi_sum is initialized to zero, but it doesn't seem correct because it only initializes some bytes ( nstates size of pointer) of xi_sum array instead of whole array (nstates nstates * sizeof(float) )