Note that using **double is not actually that great a way to do multidimensional arrays in C -- way harder to do the memory management, and also slower. Most high-performance code uses just double* and then accesses it in row-major or column-major order.
See, for example, the discussion here: http://www.fftw.org/doc/Multi_002ddimensional-Array-Format.html ... what you are doing is discussed under "dynamic arrays - the wrong way". (Julia's arrays are stored in column-major order, so they can be passed directly to a C program expecting a double* pointer to column-major data.)