# cuFFT - error in cufftComplex memory assignment

**URL:** <https://forums.developer.nvidia.com/t/cufft-error-in-cufftcomplex-memory-assignment/13957>\
**Category:** CUDA Programming and Performance\
**Created:** [December 22, 2009, 7:19pm UTC](https://forums.developer.nvidia.com/t/cufft-error-in-cufftcomplex-memory-assignment/13957 "2009-12-22T19:19:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![seabstian1134](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@seabstian1134](https://forums.developer.nvidia.com/u/seabstian1134)\
**Post date:** [December 22, 2009, 7:19pm UTC](https://forums.developer.nvidia.com/t/cufft-error-in-cufftcomplex-memory-assignment/13957/1 "2009-12-22T19:19:30Z")

</div>

Hi there!

I am getting a memory error when assigning cufftComplex memory as follows (All variables are declared and set properly prior through function call).

[codebox]

```
    float *device_proj;

cufftComplex* kernel;

cufftComplex* twice_image_vect;

int size=2*u_ext;

cudaMalloc(reinterpret_cast<void **>(&device_proj), u_ext*v_ext*sizeof(float));

cudaMemcpy(device_proj, in, u_ext*v_ext*sizeof(float), cudaMemcpyHostToDevice);

cudaMalloc(reinterpret_cast<void **>(&twice_image_vect), size*sizeof(cufftComplex));

cudaMalloc(reinterpret_cast<void **>(&kernel), size*sizeof(cufftComplex));[/codebox]

```

The error is displayed by VS9 as: First-chance exception at 0x7c812afb in 122209\_cufft\_test.exe: Microsoft C++ exception: cudaError\_enum at memory location 0x0012fa18

Which is to my understanding wrong memory assessment. I am using VS9, Cuda 2.3. and a Quadro FX1700 (I think the card is the problem).

On the other hand, continuing with the program. Assigning values to kernel and doing the FFT returns “good” values, I just don’t like the error invocation.

Anyone ever had the same problem???

Thanks for your help,

Sebastian

---

<div class="post-metadata">

**Author:** ![Luis.Alvarez](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Luis.Alvarez](https://forums.developer.nvidia.com/u/Luis.Alvarez)\
**Post date:** [March 2, 2012, 3:13pm UTC](https://forums.developer.nvidia.com/t/cufft-error-in-cufftcomplex-memory-assignment/13957/2 "2012-03-02T15:13:54Z")

</div>

Hi,

```
  I have the same problem. Could you fix it?

```
