cudaMalloc a 3-d array - errors! having errors allocating an array on the card

I’m trying to allocate a 3-d array partly using the following code:

[codebox]float ***table;

CUDA_SAFE_CALL(cudaMalloc((void**)&table, sizeof(float**)*numdates));

for (i = 0; i < numdates; i++) {

error = CUDA_SAFE_CALL(cudaMalloc((void**)&(table[i]), sizeof(float*)*numsymbols));

	mexPrintf("%d: %s\n", error, cudaGetErrorString(error));

return table;

}[/codebox]

Note that I just try to allocate the first 2-d part of the array but even here I have an error. This code returns: “30: unknown error” so I get no help tracking it down. (The first cudaMalloc returns no error, also). Any guesses?

Thanks!