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

big stack reserve size problem with intel c++ compiler

lucoaie
Beginner
320 Views

I have a library written in Delphi that exports a function which returnssome WMI data as a string, by using a call to a COM object to getthe WMI data. I call this function from an application written in C++ (using Microsoft Visual Studio 2005 IDE) which is compiled with intel compiler 9.1.037. In the applicationthat calls the dllthere are some recursive algorithms that needs a big value for stack reserve size (512MB).

The problem is: if the stack reserve size is bigger than ~350MB the functioncalled from the dll returns an empty string instead of the real string. When debugging, in the delphi function (from the dll), at the very end, I get the correct Result, but when the result is 'passed back into c++' it comes as an empty string.

I tested the dll (calling the same function from a little test application) using Delphi, C++ Builder, ... even visual basic scripting from excel and it works fine. It fails only when the application that calls the dll iscompiled with the intel compiler with a bigger reserve stack (>350MB); if the reserve stack size is smaller - it works with intel compiler too.

Any ideea would be very appreciated.

Thanks in advance!

0 Kudos
1 Reply
JenniferJ
Moderator
320 Views
Try to set the stack size withlink option /stack:512000000 for the application.
0 Kudos
Reply