Commit 34c166c
committed
do not pass NULL to cudaFreeHost
Compared to cudaFree, which allows passing 0 as C free() (noop),
the documantation for cudaFreeHost states that:
"Frees the memory space pointed to by hostPtr, which must have been
returned by a previous call to cudaMallocHost() or cudaHostAlloc()."
So ensure that this is true (although there is no evidence that there
were any problems with `cudaFreeHost(0)`).1 parent 7f772ab commit 34c166c
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
340 | 342 | | |
341 | 343 | | |
342 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| |||
0 commit comments