I ran some code last Friday before leaving work, and I'm here on Monday, and it stopped with an OutOfMemoryException. This entire process I estimate required making tens of billions of calculations, so it wasn't some small task.
I don't even know how to begin fixing this.
Any pointers?
When data structures or data sets that reside in memory become so large that the common language runtime is unable to allocate enough contiguous memory for them, an OutOfMemoryException exception results.
OutOfMemoryException' was thrown. Cause: The reason this error is occurring is because the computer in use is running out of physical RAM memory and is unable to allocate the necessary RAM to complete the task.
If you are allocating very large arrays repeatedly, you may be running into Large Object Heap Fragmentation. If this is the case, you may need to consider whether you can reuse work arrays to prevent the re-allocations and subsequent fragmentation. I definitely recommend running a memory profiler, however, as it's more likely that you have something lingering in memory past what you assumed was its expiration date.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With