A jab mapping is a Uint8Array over foreign pages, and the collector is told NOTHING about them: 62749 live RO maps of a 183-byte file survived two hours in one process without a single collection (BRO-046). JSC lets an object declare that it pins a native resource; jab's map/Buf objects must do it, so a program that maps in a loop gets collected instead of dying at vm.max_map_count. The unit that matters is the MAPPING COUNT, not the byte size — 62749 VMAs is fatal while the 250 MB they carry is nothing.
Found while diagnosing BRO-046: an idle be todo pager leaked 19.2 RO ULOG mappings/sec and wedged at 65531 VMAs, 92% of its CPU in a kernel mmap that could no longer succeed.
io.cpp:632 hands a mapping to JS as JSObjectMakeTypedArrayWithBytesNoCopy with a JABCMapROFree/JABCMapFree deallocator — the ONLY release path for an RO map.io.cpp:642 io._munmap is a documented SILENT NO-OP for a read map (ABC-023: no fd, no slot) — so RO mappings have NO explicit release at all, GC is the whole story.JABC.hpp:12-17 includes only the six PUBLIC JSC C headers; the sole collector control in them is JSGarbageCollect (JSBase.h:140).…BytesNoCopy reports its external size to the collector at all under this JSC build — the observation says it is not enough either way.abc.mmap/io.mmap, git.pack.mmap, abc.ram/io.ram, and any Buf holding a booked fd.A JS program that maps in a loop and drops the handles must be collected before it exhausts VMAs or fds — the collector must know a mapping is expensive.
/proc/self/maps lines. Grows without bound today; must plateau.abc.ram and git.pack.mmap, not just io.mmap.jab/ is read-only reference for everything else in the fleet; this ticket is the exception that edits it, and only the binding layer.
JSC::Heap entry point, STOP and report the tradeoff before writing it.JSGarbageCollect call driven by a jab-side pinned-resource counter is an acceptable shape; a collection on EVERY map is not.FILEBookedFD, JABCMapCtx) for the count — no parallel registry of live mappings.///jab/ from the main tree per work; stop and report on any clone failure, no improvised fallback.…BytesNoCopy array report ANY external cost to this JSC? probe with a map loop + heap stats/proc/self/maps line count, unbounded todayio.mmap/abc.mmap RO and RW maps; count mappings and fds, not just bytesgit.pack.mmap and abc.ram/io.ramJSGarbageCollect if the pin declaration alone does not move the collectorjab/INDEX.md + jab/API.md if the binding surface changes; full suite green