I am trying to access from the host the heap memory that was dynamically allocated in the kernel. My attempt was to first read the address the device pointer to the allocated memory points to, then use in it a memcpy operation, but it fails (debugger reports some 0xb code). The read address is correct (I print it out in the kernel and after reading it to the host).
I believe the programming guide does not explicitly state that this is not possible, however the examples hint at such a restriction (e.g. the persistently allocated memory is only used by subsequent kernel calls and not referenced from the host).
Is there a way to achieve this or am I missing something?