Thread: Memory Representation of compiled C Program

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    1

    Memory Representation of compiled C Program

    How will the c program be represented in the memory?

    What will be in the object code? will it contain address of all variables and memory segments info

    could anyone explain?

    Jagadish

  2. #2
    Banned
    Join Date
    Nov 2007
    Posts
    678
    Hi Jagdish!

    I know a bit about what you ask because of my little assembly programming background.
    You can start with such stuff too. Just search for assembly programming. You will have very good idea of all this stuff.
    Good luck!
    Last edited by manav; 04-03-2008 at 03:23 AM. Reason: Time travelling

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by gjagadish View Post
    How will the c program be represented in the memory?

    What will be in the object code? will it contain address of all variables and memory segments info

    could anyone explain?

    Jagadish
    Yes, it's represented as machine-code, which will contain the absolute or relative addresses of variables, along with initialization data for variables which are initialized (non-zero).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-06-2009, 12:27 PM
  2. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  3. Inheritance and Dynamic Memory Program Problem
    By goron350 in forum C++ Programming
    Replies: 1
    Last Post: 07-02-2005, 02:38 PM
  4. how to get memory address applied in other program?
    By wu7up in forum C Programming
    Replies: 1
    Last Post: 03-01-2003, 01:44 AM
  5. Is it necessary to write a specific memory manager ?
    By Morglum in forum Game Programming
    Replies: 18
    Last Post: 07-01-2002, 01:41 PM