Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VC++ on Visual Studio 2010: Release builds using debug heap

I'm benchmarking/optimizing a slow C++ application, and in taking some stackshots I found that the release build of my application is using the debug heap, as some of the stack traces found would indicate:

ntdll.dll!string "Enabling heap debug options\n"()  + 0x11056 bytes 

This is a 64-bit application running on Windows 7. I see two or three other complaints about this problem in the exact same environment online, but without any responses.

Does anyone have a clue why Windows or Visual Studio would be using the debug heap for a release build C++ project?

like image 355
Mahmoud Al-Qudsi Avatar asked Oct 25 '11 06:10

Mahmoud Al-Qudsi


1 Answers

The debug heap is used when a program is run under debugger (profilers often manifest themselves as debuggers). In order to bypass it the program should be started without debugging, then the debugger should be attached to a running process.

like image 89
sharptooth Avatar answered Nov 15 '22 01:11

sharptooth