OpenCL memory allocation exceeded?

Hi, I am running a kernel doing some operations on two double arrays.
This kernel takes as input the following parameters:

__global const double *pFirstInputArray (number of elements = 20097000), double4 a, double4 b,
int4 c, double4 d, double4 e, double4 f, double4 g, int4 h, double4 i, int l,
__global const double4 *pSecondInputArray (number of elements = 12)
and as output: __global double *pOutputArray (number of elements = 4838400).

If I don’t use one of the double4 parameters (e.g. the parameter f) without setting it to the kernel, the kernel works fine, otherwise no. Am I exceeding the memory capability? Why I have no errors from OpenCL?

Then what is the output for Your app, in this case? I mean what happens when You run it?

The *pOutputArray is a double image (like a distance map) that when I set all the parameters it is all 0 (black image) otherwise it is correct.
Any ideas?

Maybe it is a problem with kernel launch arguments passing (done in a wrong way)? Could You provide some code?