So i did some monitoring of the resource monitor in windows while in safemode and the first screenshot just after it booted and the second screenshot is from when it was using around 14 gb of ram. I don't know where the ram usage is coming from, the resource monitor also doesn't seem to know.