Where in memory is the heap located? Is it in the programīs data segment? or is it allocated somewhere in kernels memory?
Thanks !
Where in memory is the heap located? Is it in the programīs data segment? or is it allocated somewhere in kernels memory?
Thanks !
thx
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.