2 ms·
Freeing memory to the OS causes TLB cache stalls in all other threads in the process. If the program runs for any length of time, it will probably need the sam
by ncmncm 7y ago
Freeing memory to the OS causes TLB cache stalls in all other threads in the process.
If the program runs for any length of time, it will probably need the same memory again, so freeing it is a pessimization.
Standard C library free() implementations very, very rarely free memory back to the OS.