You don't need to copy the contents when you create the buffer - you can copy data from host memory in to the buffer later with clEnqueueWriteBuffer. e.g. for some integers in A:
....
int *A = malloc(n*sizeof(int));
cl_uint error;
cl_mem buffer = clCreateBuffer(context, CL_MEM_READ_WRITE, n*sizeof(*A), NULL, &error);
....
error = clEnqueueWriteBuffer(queue, buffer, CL_TRUE, 0, n*sizeof(*A), A, 0 NULL,NULL);
The specification is here: http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clEnqueueWriteBuffer.html