You can increase the RAM allocation by changing the value in the “Let Photoshop Use” box in Edit > Preferences > Performance > Memory Usage. Normally, Photoshop uses 70% of available RAM.