Do we have to free memory allocated through cudaMemcpyToSymbol? If so, how do we do so? The programming guide says cudaGetSymbolSize is used to get size of allocated memory, so memory is allocated for sure.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
cudaMemcpyToSymboldoes not allocate memory, it simply copies to a statically declared global or constant memory symbol in the current context. AndcudaGetSymbolSizereturns the size of any statically declared symbols. There is no dynamic memory allocation involved in either operation.