interface

jsc.MemoryUsage

interface MemoryUsage

Memory statistics for the whole process, returned by memoryUsage. Sizes are in bytes.

  • current: number

    Resident set size: the physical memory the process is using right now. The same measurement as process.memoryUsage().rss.

  • currentCommit: number

    On macOS and Linux, the memory currently committed by mimalloc, the allocator Bun uses for memory outside the JavaScript heap. On Windows, the process's commit charge.

  • pageFaults: number

    On macOS and Linux, the number of major page faults (faults that had to read from disk) the process has taken. On Windows, the total number of page faults.

  • peak: number

    The largest resident set size the process has had.

  • peakCommit: number

    The largest value currentCommit has had.