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?

有帮助吗?

解决方案

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.

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top