{
  "schema": "sync-camera-findings-v1",
  "id": "research-2026-09-21-windows-desktop-shm-bypass",
  "findings": [
    {
      "id": "A",
      "topic": "Win32 named file mapping ring buffer in temp path",
      "summary": "Mapping %TEMP%\\SyncCamera.frames via CreateFileMappingW and MapViewOfFile creates an explicit 3-slot shared memory ring matching the POSIX binary header layout. Both the native Media Foundation camera sink and Electron desktop readers map identical 8,294,400-byte slots.",
      "disposition": "Retained"
    },
    {
      "id": "B",
      "topic": "Zero-copy direct writer submission",
      "summary": "Implementing submit_written on Windows passes the destination slot pointer directly to the producer canvas write callback, eliminating intermediate framebuffer copies before sequence lock publication.",
      "disposition": "Retained"
    },
    {
      "id": "C",
      "topic": "Cross-consumer demand multiplexing",
      "summary": "Updating last_demand_us in the ring header offset 24 from both virtual camera streams and desktop shared memory readers ensures frame generation remains active when either consumer demands frames, idling only when both are inactive.",
      "disposition": "Retained"
    },
    {
      "id": "D",
      "topic": "Zero GC churn via preallocated slot buffers",
      "summary": "Preallocating three persistent 8.29 MB Buffer objects in the Electron main process eliminates ~497 MB/s of Node heap allocation churn on Windows, preventing V8 garbage collection pauses.",
      "disposition": "Retained"
    }
  ]
}
