I think there’s an error in cuda NVIDIA CUDA C Programming Guide Version 4.0 3/6/2011
A sample code on page 22 reads:
__device__ float* devPointer;
float* ptr;
cudaMalloc(&ptr, 256 * sizeof(float));
cudaMemcpyToSymbol(devPointer, &ptr, sizeof(ptr));
I think the last instruction should read
cudaMemcpyToSymbol(&devPointer, &ptr, sizeof(ptr));
(ampersand in front of the 1st argument)