I try to install magento 2 via composer.
composer create-project --repository=https://repo.magento.com/ magento/project-community-edition .
But I get "out of memory". I have 16 GB RAM.
So I restarted windows and tried again directly after restart without any programs open, but it still throws this error.
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 64 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Rule2Literals.php on line 53
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.