3 ms·
Used to be linux zerod allocated pages only upon first use. But the time to take the page fault was larger than the time to zero the page so they changed to zer
by JoeAltmaier 4y ago
Used to be linux zerod allocated pages only upon first use. But the time to take the page fault was larger than the time to zero the page so they changed to zero-immediately.
Modern processors zero things very, very fast. This seems like a defensible approach.
- sedatk 4y agoOn Windows, there's that lowest priority task (Zero Page Allocator) whose sole purpose is to zero out the freed pages and add them to the available pages list. This way, allocation tasks don't have to wait for zeroing. IIRC, Zero Page Allocator's priority was so low that it was even lower than the lowest priority available to Win32 API's.
- ajross 4y agoYes, but this is a heap, not a VM. You're not streaming through the cache into DRAM, you're polluting the cache with dirty lines that the app would presumably like to be using for near-future loads. The performance impact is obviously going to depend on usage patterns, but it certainly could be much higher.