Thread: heap

  1. #1
    Unregistered
    Guest

    heap

    Where in memory is the heap located? Is it in the programīs data segment? or is it allocated somewhere in kernels memory?

    Thanks !

  2. #2
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    program's
    hello, internet!

  3. #3
    Unregistered
    Guest
    thx

  4. #4
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    It probably depends on the operating system.

  5. #5
    Visionary Philosopher Sayeh's Avatar
    Join Date
    Aug 2002
    Posts
    212
    Actually, the O/S owns it all. Whenever an application runs, the O/S Memory Manager allocates a chunk of RAM out of the System Memory, sized to meet the needs of the application. This is called a 'heap'. It then loads the program into it and executes the stub which fires up the jumptable which resolves jumps prior to jumping into the first instruction in main().

    If you know what you're doing, you can create your own heaps in your program's data space, or in the system data space.

    the 'heap' does not reside in your program's data space-- it _IS_ your program's entire alotted space.
    It is not the spoon that bends, it is you who bends around the spoon.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. heap
    By George2 in forum Windows Programming
    Replies: 2
    Last Post: 11-10-2007, 11:49 PM
  2. Heap Work
    By AndyBomstad in forum C++ Programming
    Replies: 1
    Last Post: 05-16-2005, 12:09 PM
  3. Do you know...
    By davejigsaw in forum C++ Programming
    Replies: 1
    Last Post: 05-10-2005, 10:33 AM
  4. heap question
    By mackol in forum C Programming
    Replies: 1
    Last Post: 11-30-2002, 05:03 AM
  5. stach and heap.
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 01-26-2002, 09:37 AM