mem.Rdmem_info prints the amount of RAM that is required and available to process a SpatRaster.
free_RAM returns the amount of RAM that is available
mem_info(x, n=1, print=TRUE)
free_RAM()free_RAM returns the amount of available RAM in kilobytes
mem_info(rast())
#>
#> ------------------------
#> Memory (GB)
#> ------------------------
#> check threshold : 1 (memmin)
#> available : 22.08
#> allowed (50%) : 11.04
#> needed (n=1) : 0
#> ------------------------
#> proc in memory : TRUE
#> nr chunks : 1
#> ------------------------
free_RAM()
#> [1] 23156324