I have the following code, where the assertion fails. Can anyone explain me why?

```
double *E = (double *) malloc(sizeof(double) * voxelSpaceSize);
double *E_new = (double *) malloc(sizeof(double) * voxelSpaceSize);

// ...some manipulations inside E and E_new, the memory locations do not change though
...

memcpy(E, E_new, sizeof(double) * voxelSpaceSize);        

for (int i=0; i<voxelSpaceSize; i++) {
  assert(E[i] == E_new[i]);
}

```