What happens to the allocated memory on the GPU after the application using it quits if cudaFree () was not used?

If cudaFree () is not used at the end, will the freed memory be automatically used after the application / kernel function exits from it?

+4
source share
2 answers

Yes.

When your application terminates (whether gracefully or not), all of its memory is returned back by the operating system, regardless of whether it has freeit or not. Similarly, the memory allocated on the GPU is controlled by its driver, which will free up all the resources of your application, cudaFreed or not.

, , , :)

+8

, , . .

0

Source: https://habr.com/ru/post/1609549/


All Articles