Are you running windows 10 _natively_ on your hardware or do you 'abuse' virtualization software (Like virtualbox, vmware, etc) to run windows 10 ?
In case the latter you have to make sure to 'provide' enough memory for lazarus and your application to be able to run properly. There are also hosts that are not really suited (such as attempting to run win10 on a arm device such as a pi, then start lazarus and expect to be able to debug your application).
I strikes me as odd running out of memory, but everything is possible
. (Assuming that you did not run into a bug or use faulty code)
edit: ah, sorry i just noticed your sig. still, the virtualization question remains
I assume that you have enough memory installed ? enough free diskspace etc ?