- Close Photoshop
- Navigate to HKEY_CURRENT_USER\Software\Adobe\Photoshop\120.0
- Right click on 120.0 and create a new DWORD.
- Rename the DWORD value to "OverridePhysicalMemoryMB".
- Right click on it and select modify.
- Change the base value from "hexadecimal" to "decimal".
- Change the value data from "0" to "24000".
(https://forums.adobe.com/thread/2416657)