4 ms·
> If your program has threads, unmapping memory is generally to be avoided. Could you expand on this? I recently encountered a situation where allocating and f
by usefulcat 7y ago
> If your program has threads, unmapping memory is generally to be avoided.
Could you expand on this? I recently encountered a situation where allocating and freeing many large allocations using mmap() seemed to eventually cause problems with thread creation, but I had assumed that it was probably because the virtual address space had become too fragmented, which of course would not solely be a result of unmapping. Or maybe that fragmentation is what you're referring to, and I'm just reading too much into that sentence.
- ncmncm 7y agoIt just creates long stalls as the TLBs of all cores that threads in the process run on are flushed and must be reloaded from backing RAM.