title: c size of one array to another
body: <p>hi i have the following code...</p>
  
  <pre><code>int *a, *b;
  int *d;
  int N = 2000;
  size_t size = N*sizeof(int);
  
  a = (int *) malloc(size);
  b = (int *) malloc(size);
    ...
  cudaMalloc((void **) &amp;d, size);
  </code></pre>
  
  <p>it works just fine... now assume I have the following</p>
  
  <pre><code>char **t = malloc(2000* sizeof *t);
  for(...)
  {
     ...
     t[i] = (char *)malloc(sizeof(char)*changing_length);
     ...
  }
  </code></pre>
  
  <p>how to do cudaMalloc for t as if it is one dimensional array (taking into account that each element has different size) ?</p>