System & Memory Utilities

1 Overview

System information and memory utilities: query available RAM, CPU cores, recommended thread counts, and memory thresholds.

2 Functions

2.1 get_memory_thresholds

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

2.2 memory_info

Displays system memory information and current conversion thresholds. Useful for debugging and understanding memory limits.

2.4 get_total_ram

Returns the total physical RAM installed in the system.

2.5 get_available_ram

Returns the amount of RAM currently available for allocation.

2.6 can_allocate

Checks whether a given amount of memory can be safely allocated while maintaining a safety margin.

2.7 get_cpu_cores

Returns the number of logical CPU cores (processors) available.

2.8 system_info

Returns a comprehensive summary of system resources.