My issue is that I have a 32-bit DLL which I cannot modify. The DLL can sometimes require around 1.5 gigs of memory or so under normal operation.
When I use a C++/unmanaged code test program, the DLL will only go out of memory at about 2 gigs. This is expected as this is the maximum size available to a 32-bit process. Hence, the DLL runs fine under normal operation.
When I P/Invoke the DLL from a C# application that itself takes about 250 MB, the DLL errors out when the entire process reaches about 1.4 gigs. My question is does P/Invoke provide less memory for the 32 bit process to use? Is there some way I can give it more?
EDIT: The P/Invoked functions are actually called from a C# assembly referenced by my main assumbly. Not sure if this is relevant in any way.