Visit A RAM and CPU measurement tool for Windows for the full story.
Major point: measuring peak RAM usage of a process in Windows is possible using https://github.com/cbielow/wintime (available on GitHub). We exemplify its use by applying to the Microsoft Compiler and compare it against g++ on Linux.