The issue you are facing might be related to low virtual memory, please try increasing your virtual memory by following the steps below:
Go to the Start Menu and click on Settings.
- Type performance.
- Choose Adjust the appearance and performance of Windows.
- In the new window, go to the Advanced tab and under the Virtual memory section, click on
- At the bottom of the new window, check what the Recommended value is and how it compares to Currently allocated.
- If the current setting is significantly less than the recommended, uncheck the Automatically manage paging file size for all drivesbox at the top of the same windows and then click on Custom size.
- Enter the Recommended value in the Initial Size box, and a larger figure in the Maximum size
- Click OK to save the new settings.
For more details about virtual memory, you may look [Here].