I am processing some data and everything works as intended, with memory used hovering right around 4.5 gb. I am opening .dat files, writing data to a structure, saving the structure, and then I clear the .dat file and the structure to make room for the next file to process. Everything works perfectly, until the file size goes from 9 mb to 18 mb. All of a sudden my ram usage literally shoots up to 16 gb (see picture below for more info, wasn't able to get a print screen because computer locked up). What could be the issue here? I have a pretty good feeling that it isn't my code, since it works fine until the file size increases by 9 mb, which should not use 10+ gb of memory.