3 ms·
Malloc can be lock free if you add a thread which wakes up periodically and ensures there is free memory available. Also, any algorithm can be made mostly mall
by cjensen 10y ago
Malloc can be lock free if you add a thread which wakes up periodically and ensures there is free memory available.
Also, any algorithm can be made mostly malloc free if you keep a freelist instead of freeing memory. Malloc will then only be called enough times to fill the max utilization.