TFM. cudaMemset, like the C standard library function it is modelled after, takes a byte sized value and copies it to however many bytes you specify to the destination memory address. So both the value and the size arguments you are passing are probably to the function are probably incorrect.
What possibilities are there? You pass a byte to fill the memory with, the number of bytes to fill, and the starting address. That is how it works. Which leads to another interesting question…
Page 106 of the 2.3 programming guide says it is. This almost guarantees that the address being passed to cudaMemset is wrong. You will probably have to call cudaGetSymbolAddress(), and maybe cudaGetSymbolSize to make what you are trying to do work, if it is actually possible at all (I don’t know I have not tried it).
I compiled your implementation of cuPrintf on linux by commenting out timeSetEvent(), but it outputs nothing. Do you know is there any linux equivalent of this function? Thanks!