Overview

memtools provides debugging tools to detect and solve memory leaks in R:

  • Record memory snapshots of the R heap.
  • Compare snapshots to detect leaked objects with a large retained size.
  • Inspect the shortest paths between nodes (e.g. between a leaked node and its dominator).

See vignette("memtools") for a tutorial.

Installation

Install memtools from github with:

remotes::install_github(
  "r-lib/memtools",
  build_manual = TRUE,
  build_vignettes = TRUE
)