Community
cancel
Showing results for 
Search instead for 
Did you mean: 
hvz
Beginner
51 Views

IPO and memory usage

I've noticed something odd and I hope that someone can point me at what's causing this.

I have a project, if I compile it without /Qipo and start the executable it uses about 100 MB. When I add /Qipo to the compiler flags, the executable suddenly uses 160 MB. Both versions work fine. A debug version also uses 160 MB.

This is not immediately a problem, but I don't like allocating more resources than I really need. So I hope that there's a way to reduce the /Qipo memory usage to roughly the same amount as without /Qipo.

I'm using compiler version 10.1 (it still gives me the best performance), 32 bits.

0 Kudos
4 Replies
jimdempseyatthecove
Black Belt
51 Views

/Qipo has the intended purpose to inline more code. When using /Qipo, you can reduce footprint by instructing the compiler to not inline functions that do not improve performance. Prior to /Qipo, the programmer had the responsibility of specifying where to place "#pagma inline", now with /Qipo you have the responsibility to specify "#pragma noinlin". You win some, you loose some.

In some situations, inline-ing and loop unroll-ing will decrease performance. (as well as increasing code size)

Jim Dempsey

hvz
Beginner
51 Views

The executable file size with /Qipo is only 6 MB, so the extra 60 MB of memory used cannot be caused by code. Unless I'm misunderstanding something it must be memory that gets allocated.

hvz
Beginner
51 Views

Never mind - I figured out the cause!

The /Qipo release built that I have tested was compressed with UPX. Without that, the memory usage is also about 100 MB. So I guess I need to stop using UPX......

Kittur_G_Intel
Employee
51 Views

Hi,
In addition, please note the following:
• Ensure the memory issue is due to ipo (application should work fine without ipo)
• When it comes to memory, you should note that IPO is a memory bound process so it’s important to remember that memory is bottle neck. Typically 16MG on each system needed as a thumb rule.
• If build time becomes an issue, try to use -ipo-jobs<n> option to specify the number of jobs to be executed simultaneously during the link phase,  to speed up build time on multi systems with lot of memory (n equal to num of processors)
Regards,
Kittur