cuda - What will happen to the allocated memory on GPU, after the application using it exits, if cudaFree() was not used? -
if cudafree() not used in end, memory being used automatically free, after application/kernel function using exits?
yes.
when application terminates (be gracefully or not), of memory reclaimed os, regardless of whether had free
d or not. similarly, memory allocated on gpu managed driver, release resources application held, cudafree
d or not.
it practice every allocation has matching deallocation, don't use excuse not deallocate memory :)
Comments
Post a Comment