Freeing up memory on the device

Hello all,

If I am in a kernel and wish to free up some memory on the device pointed to be *myDevicePtr, how do I do that from inside a kernel function?

I couldn’t find anything on the cuda api for doing that, and using free() results in an error that I can use a host function only in emulation mode.

Thanks for your input!

You can’t do memory management directly from the device. Read the manual again because if you’re asking the question you don’t understand how the architecture is set up and the difference between the device’s execution model and the CPU.