title: memcpy() with different data types
body: <p>Trying to copy A into B....</p>
  
  <pre><code>char *A;
  double *B;
  unsigned int size = 1024;
  
  A = malloc (size*size * sizeof (char));
  B = malloc (size*size * sizeof (double));
  //fill A here
  
  memcpy (B, &amp;A[0], (size*size * sizeof (char)));
  </code></pre>
  
  <p>Printing values in B don't match whats in A.</p>
  
  <p>What's going wrong?</p>
  
  <p>Thanks for any help!</p>
  
  <p>Edit: The point of this is to test the memcpy function's speed in relation to the size of the L2 cache. I'm just wanting to make sure the code above is actually copying all of A into B. Sorry about leaving out this info: I just try to make it as simple as possible (and went too far this time)</p>