Files
scriptc/packages
Chris Tate 482c2c0178 Return the pages faulted in past a parked arena's frontiers
When a script thread parks its allocator arena, each class slice still
holds the pages past its bump pointer that were faulted in but never
carved: the rest of the huge page the bump pointer is in, and the pages
the pre-fault helper faulted in ahead of it. The same applies to region
chunks when the thread exits. Until another thread claims the arena,
nothing carves there, so a program that continues on threads that never
claim it (parse threads ahead of a check on the main thread) kept them.

- scr_sa_park_arena returns those pages with MADV_DONTNEED. The next
  thread to claim the arena faults them in again as it carves, and they
  read as zero, as fresh pages do.
- scr_rgn_thread_exit returns each chunk's pages past its bump on worker
  threads; nothing carves in an exited thread's regions.
- scr_mem_release_ahead drops pre-fault requests that overlap the range
  and waits for one in progress before returning it, so the helper does
  not fault the pages in again.
- scr_alloc.test.c checks that a worker that shares and carves past the
  huge-page switch leaves no resident pages past its frontier, keeps its
  blocks, and that the next thread carves on from the frontier, zeroed.
2026-10-21 09:04:23 -05:00
..
2026-10-21 03:13:45 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-21 00:08:02 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00
2026-10-20 17:56:44 -05:00