memory allocation question

I have a question about memory allocation in cuda. I have a ‘c’ code and inside this code I call ‘extern C’ function that is placed in ‘cu’ file. I do some memory allocation operations and call kernels inside this extern function. In my application this extern function is called more than one. I want to allocate device memory in the first call, and I don’t want to allocate again in other calls. Is it possible?