Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function computeNonCacheRemainderBytes

    • Heap headroom left OUTSIDE the cache pool — the shared memory model every non-cache consumer sizes itself from (the eager child loader, refinement residency, GPU geometry, the L2 write queue), so a session uses ONE remainder rather than each consumer inventing its own view of the heap.

      Resolution matches the cache pool: explicit pool override → measured heap → device-class pool. A pool-based input is converted back to the remainder it implies (pool × NON_CACHE/CACHE) so a WebKit session — where the heap cannot be measured at all — stays on the same model as a Chrome one.

      Returns undefined when there is no memory signal at all (non-browser / Firefox+Safari without an override), so each consumer applies its own no-signal fallback.

      Parameters

      • OptionalheapLimitBytes: number

        Override for the device heap limit (tests). When omitted, readHeapLimitBytes is consulted; an explicitly passed non-positive value skips the heap path WITHOUT probing browser state.

      • OptionalpoolOverrideBytes: number

        Explicit total cache pool in bytes. Takes precedence over the heap-derived remainder.

      • OptionalfallbackPoolBytes: number

        Device-class total cache pool in bytes, used only when neither an explicit pool nor a measurable heap is available.

      Returns number | undefined