I have an app that has to load large amounts of data in chunks (maybe like, half a MB in a string) but for some reason I'll get out of memory errors even though there is TONS of ram left + page file. The memory used is then cleared once the string has been processed.

Is there a way to make the program less sensible to large amounts of ram being used? If the ram is there to use, then it should use it instead of crapping out.