The helpful NVIDIA blog article Accelerating Standard C++ with GPUs Using stdpar explains that through CUDA Unified Memory, data dynamically allocated on the heap in CPU code, and compiled by NVC++, can be managed automatically. Despite this knowledge, we are still coming across
cudaErrorIllegalAddress runtime errors, which in the end turn out to be accounted for by mistaken usage of stack data. I wonder if there are any plans also to support the automatic management of CPU stack data.
More presently, I would like to be able to determine if a pointer has been allocated on the heap. Is there a function which can confirm that a pointer is targeting heap-allocated data?