Platform is Jetson Nano. I have a single call to malloc in my CUDA kernel which is only called once. This call cannot allocate more than 2MB of memory. It fails at 4MB.
HOWEVER, when I use cudaMalloc from the host code, it can allocate much more than 2MB.
Why does malloc in device code not work for large quantities of memory?
Please see the CUDA Programming Guide section Heap Memory Allocation. The default size size for the device side Malloc Heap is 8MB. The limit may have been reduced on mobile platforms.
If the limit is 8MB and the code continues to fail then please post a minimal viable reproducible.
This is on Jetson Nano. Thanks for the link BTW. It’s a big manual and I hadn’t read that section on heap memory yet as I assumed cudaMalloc would abide by the same rules as device-side malloc.