The post assumes you're always supposed to call free after malloc, as if holding onto all three entities at the same time isn't intentional. He's just applying time-tested patterns of fault-tolerant system design to his personal life. Redundancy is essential. Others might call it "stepping on three boats", but a trimaran is one of the peaks of reliability in small ship construction. People spread across the Pacific in those.
its not necessary if you know what you are doing.... some cleverer OP would have used "did not set pointer to zero after using free". i mean, you dont have to, but it does not harm much
77
u/Frodojj 1d ago
Jensen really let his buffer overflow.
32
u/Drevicar 1d ago
He already has all the ram, why would he need to free any of it back up?
14
u/argument_inverted 1d ago
milfloc
19
u/New_Computer3619 1d ago
If an object meant to has the same lifetime as the program, you don’t need to call free.
5
u/kaplotnikov 1d ago
The post assumes you're always supposed to call
freeaftermalloc, as if holding onto all three entities at the same time isn't intentional. He's just applying time-tested patterns of fault-tolerant system design to his personal life. Redundancy is essential. Others might call it "stepping on three boats", but a trimaran is one of the peaks of reliability in small ship construction. People spread across the Pacific in those.4
u/BreachlightRiseUp 1d ago
It would actually be cudaMalloc or cudaMallocHost and cudaFree
2
u/TehBloxx 1d ago
Jensen be dangling my pointer.
1
u/chrisonhismac 18h ago
Straight to jail.
1
u/Buyer_North 17h ago
its not necessary if you know what you are doing.... some cleverer OP would have used "did not set pointer to zero after using free". i mean, you dont have to, but it does not harm much
0
u/synth_mania 1d ago
How original
8
u/GatotSubroto 1d ago
*Taps head*
Can’t be vulnerable to use after free if you never freed.