mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-10-13 13:44:26 +00:00

This commit enhances the Windows RSS memory retrieval functionality in OsUtils to provide better compatibility and reliability across different Windows versions. Key improvements: - Added multiple fallback strategies for Windows RSS retrieval: 1. PowerShell approach (modern, Windows 7+ with PowerShell 2.0+) 2. WMIC approach (fallback for older systems) 3. Tasklist approach (final fallback, most compatible from XP to Win11) - Enhanced error handling with debug-level logging for memory queries to avoid log spam while maintaining visibility for debugging - Added robust CSV parsing for tasklist output with proper handling of quoted fields and comma-separated numbers (e.g., '1,234 K') - Improved regex pattern matching for memory values that handles various formats returned by Windows commands - Refactored code structure by separating Unix and Windows logic into dedicated methods for better maintainability These changes ensure reliable RSS memory retrieval across all supported Windows versions while maintaining backward compatibility and improving error handling.