get_memory_thresholds

get_memory_thresholds

SYSTEM_UTILS

1 Description

Calculates appropriate memory thresholds for conversions based on total system RAM. Returns conservative values suitable for most systems.

2 Usage

get_memory_thresholds(total_ram = NULL)

3 Arguments

Parameter Description
total_ram Numeric. Total system RAM in GB. If NULL (default), auto-detects using C++ implementation.

4 Value

Named list with thresholds in MB:

  • silent: Size below which conversions happen silently
  • warning: Size requiring user confirmation
  • force: Size requiring force=TRUE
  • blocked: Size that cannot be converted

5 Details

Calculation logic:

Uses percentage of total RAM with safety margins:

Fallback values (if RAM detection fails):

6 Examples

\donttest{
# Auto-detect
thresholds <- get_memory_thresholds()
# $silent: 3000 MB, $warning: 8000 MB, etc.

# Manual specification (e.g., for 32GB system)
thresholds <- get_memory_thresholds(total_ram = 32)
}

7 See Also