mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-09 11:44:31 +08:00
A worker thread's large blocks come from glibc heaps, and the first large block of each heap made the allocator check /proc/self/maps before advising the heap huge pages. The check was skipped only for the heap the thread advised last, so threads that switched between heaps read the maps again at every switch: 9,000 to 11,000 reads in a type check of T3 web with four checkers. A process-wide table now records every heap decided, and each heap is read once.