Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Memory leak caused or worsened by /Qipo?

Hans_Van_Zutphen
Beginner
409 Views

I've made a DLL while I compile with /Qipo (Intel C++ Composer XE2015). If I call the constructor and destructor of the main class in it, the memory doesn't get released and after a few calls (32 bit mode) I'm out of memory. However, if I disable /Qipo, there doesn't seem to be a problem at all (I will run it for a longer period tonight, but I let it construct and deconstruct 1024 times earlier tonight and I didn't notice an increase in memory usage).

If I use /Qip mode, the leak is 8 MB per call. With /Qipo it's about 300 MB.

I have checked a .EXE version of my software with Inspector XE2015 and it doesn't report any leaks, and neither does the debugger.

Any clues to help me find the cause are helpful. If I have a memory leak somewhere in my code, could that somehow cause - when using IPO - the whole memory to leak???

0 Kudos
3 Replies
Hans_Van_Zutphen
Beginner
409 Views

Update: Leak does not occur in older versions of the Intel compiler. I just compared the previous release of my software (which was built with a slightly older compiler version, unfortunately I don't have the pc on which I built it with me at the moment).

Anyway, the previous release doesn't have this leak, but if I build it (with the same settings) in XE2015 15.0.2.179, it leaks.

0 Kudos
Hans_Van_Zutphen
Beginner
409 Views

I think I found what's causing it. In some .cpp files with long lists of settings that don't need to perform well I had chosen /O1, in others /O3. If I set /O3 for all, the leak is gone!

0 Kudos
Kittur_G_Intel
Employee
409 Views

Hi Hans,
The leak should also not happen even if you happen to use /O1 for some files and /O3 on others and it should be investigated. If you can attach a test reproducer then the issue can be filed with the developers, thx
_Kittur

0 Kudos
Reply