Question

I wrote an application with Qt 4.8.1 and MinGW32 (Nokia Qt SDK). I try to load a large file with this app, but the app always crash when memory usage reach 1,868 MB. If I reduce the size of input file the app works fine. Is there any memory limitations on Qt apps or MinGW32? What should I do if I really want my app to use more memory? My windows is 64 bit.

p.s. Adding "QMAKE_LFLAGS_WINDOWS += -Wl,--stack,32000000" to .pro file won't work

Thanks very much!

p.p.s. I saw many software are capable of using 10+ GB, e.g. Matlab, how to do that on Qt apps?

Was it helpful?

Solution

Your copy of windows may be 64 bit, but MingW32 is a 32 bit compiler, so any app written with that compiler has all the standard limits inherent to 32 bit Windows. Effectively, you won't be able to get more than around 2G of memory for your app to use.

There's a method to get that up to 3G, but beyond that you need a 64 bit compiler.

OTHER TIPS

2GB is limit is for process only. You can spread your application along N processes (32-bit) to allocate N x 2GB. Operating system must still be 64-bit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top