In “Cuda C Programming Guide” - chapter B.15. - Dynamic Global Memory Allocation; states that it is possible to dynamically allocate Device memory.
However when I try to use malloc from within the kernel I get following error:
error : calling a host function from a device/global function is not allowed
Is it possible to use malloc from within the kernel function or chapter B.15. is completely wrong?
I have figured out what is the problem. On devices with Compute Capability < 2.0 compile will fail if you have malloc in global or device function. However on compute capability >= 2.0 it works as stated in documentation.
As time goes by I realize that purchase of C1060 a month ago was complete waste of money :(