In the course of tracking down some memory leaks in the project I'm working on, I've also been working on updating the various hardware API libraries. A couple of these are unmanaged 32bit libraries, which forces our application to compile to x86; this is not a problem in and of itself. I'm working on upgrading these libraries to 64 bit versions so that our application doesn't have to run in 32 bit, but it led me to wonder about memory leaks and the addressable memory space.
Given memory leaks, when running in a 64 bit process, will an application theoretically be able to run for a longer period of time before hitting an OutOfMemoryException
? There are at least two cases for this
Memory Fragmentation - There is not a contiguous memory block to allocate a large object, so this exception could be thrown even though there appears to be enough free memory
Low Physical Memory - There simply isn't enough memory available, contiguous or not, to allocate a new object