user1118148
user1118148

Reputation: 193

freeing memory allocated by cudamallocpitch

How do we free memory allocated by cudaMallocPitch. I tried to find in programming guide, but could not get the answer.

Upvotes: 1

Views: 700

Answers (1)

Dan
Dan

Reputation: 10786

Use cudaFree() just like most other CUDA malloc()s. See docs:

"Frees the memory space pointed to by devPtr, which must have been returned by a previous call to cudaMalloc() or cudaMallocPitch()."

http://tinyurl.com/8y3hj35

Upvotes: 2

Related Questions