views:

47

answers:

1

When I build my application statically, it comes out to just over 5Mb, so it's a small, simple program. However, any system that has under 3Gb of ram can't run the program, saying there's not enough memory. There is nothing very memory intensive in the program, and I did nothing to allocate memory specifically. Any thoughts on whats causing this?

A: 

I believe that less the 1Mb built code can easilly fill the 10GB memory. Make sure that your code does not use redundant memory.

Narek
I did nothing at all to allocate memory inside the program, so unless there's some hidden thing in the build process or something, I don't think that's the issue...
May be you could post some code or compile with another compiler or on another OS? Just it is impossible to guess your problem.
Narek
It compiles and runs in QT creator in debug or release mode on any system I've tried. When I build a static app on mac, everything works fine, no memory issues. I can't post the code, because I'm writing the program for work.
Hey may be you could debug and after each line look after memory? Did you try? You could find the line that couses the problem (or lines???).
Narek
The program doesn't use much memory on any system while in debug mode, and the static build doesn't either on a system with >3Gb RAM, it uses about 17k.
Did you wrote a virus? Quite good virus for computers with less then 3Gb RAM!! :) Sorry, I have no idea!
Narek