Probably a complete accident. C (and by extension CUDA) makes no guarantees about the state of memory returned by the standard memory allocation operations.
More likely a security precaution, to prevent programs examining what the last program (conceivably from another user, or even superuser) did.
More likely a security precaution, to prevent programs examining what the last program (conceivably from another user, or even superuser) did.
Nope, it’s just like normal malloc. If you want to prevent somebody else from reading your memory on a successive run, you have to clear it yourself before you quit.
Nope, it’s just like normal malloc. If you want to prevent somebody else from reading your memory on a successive run, you have to clear it yourself before you quit.