From your task manager its definitely not the computer running out of memory its only at 12%. Since Vista, HP has tended to have extremely buggy software when it comes to scanning and printing. My old HP all in one printer has been left in the cupboard for a couple of years unused. I think its the main reason they have lost a lot of users to the likes of Epson and Canon. My personal favourite is Epson, my Epson V33 flatbed scanner performs extremely well. Moreover HP split into 2 recently; a sign showing that it/they are struggling: [URL] [URL]#.VNFMz52sWYA
When I try to save document saved at 600 DPI I get " There is not enough available memory (RAM) on the computer to complete the scan. Please lower the resolution setting of the scan and try again." I have lot of RAM and have run system checks and cannot find where something is using a RAM enough to cause this message.  I have saved 600 DPI pictures and documents with no problem up till now. Saving to computer from HP 3630 wireless scanner.   Windows 8.1  
XPS 8700 Not enough memory (RAM)