compiler's "debug" configuration

This is a discussion on compiler's "debug" configuration within the C Programming forums, part of the General Programming Boards category; well, since a few months ago when I finally learned the basic concepts of pointers and memory addresses, I have ...

  1. #1
    Madly in anger with you
    Join Date
    Nov 2005
    Posts
    211

    compiler's "debug" configuration

    well, since a few months ago when I finally learned the basic concepts of pointers and memory addresses, I have chose to delve deeper into the subject, since since I have learned how to properly use them I can't seem to stop.

    anyways I've been working on a program where I am beginning to think the most efficient design would involve a linked list, so I found some great papers from the Stanford University CS library. one of which, "PointersAndMemory" has to be the best paper on pointers I have read yet, which I wish I had have found a few months ago.

    it explains heap memory management, and mentions that if a program allocates memory on the heap but fails to deallocate that memory, that it is a memory leak. it also mentions that most compilers have a "heap debugging" utility which adds debugging code to a program to track every allocation and deallocation. I am just wondering if this is what the compiler does when I choose to compile code in "Debug" build configuration in compilers such as MSVC++?

    the reason why I ask this is because I don't pay much attention to the Debug build config, mainly because it tends to make substantially larger executables than the Release build config. heap debugging code would explain the size difference, but I don't see how it could make that much of a size difference, especially in programs that do little if any allocating on the heap.

    so generally my question is what is happening when I choose to compile my code in "Debug" build configuration? what is the compiler doing that it doesn't do when I choose to compile in "Release" build configuration?


    thanks in advance.

    Intel Core 2 Quad Q6600 @ 2.40 GHz
    3072 MB PC2-5300 DDR2
    2 x 320 GB SATA (640 GB)
    NVIDIA GeForce 8400GS 256 MB PCI-E

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    the debug build contains information that gives the debugger possibility to map any instruction in your executable to some line in your code.

    I think you should search the inet for more info on the subject (there is a lot of info there)
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Doxygen failing
    By Elysia in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 04-16-2008, 01:24 PM
  2. C++ Builder Comparison
    By ryanlcs in forum Tech Board
    Replies: 14
    Last Post: 08-20-2006, 09:56 AM
  3. Generic configuration module
    By linux454 in forum C++ Programming
    Replies: 0
    Last Post: 01-30-2006, 10:44 PM
  4. Compilers, Compilers, Compilers
    By Stan100 in forum C++ Programming
    Replies: 11
    Last Post: 11-08-2002, 03:21 PM
  5. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 09:52 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21