mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-19 17:49:04 +00:00
By default malloc manages memory internally in larger blocks. When one of those blocks is added we initialize a free list by touching each of the new block's pages, thereby committing all that memory upfront. This changes malloc to build the free list on demand which as a bonus also distributes the latency hit for new blocks more evenly because the page faults for the zero pages now don't happen all at once.
15 KiB
15 KiB