Trying to eliminate memset in cuda_double_allocate