This is the memory model
Code:
----------------------
Code segment
"Execution code"
-----------------------
Data segment
"Global variables and constants"
-----------------------------------
Heap
"Dynamically allocated memory"
.
.
.
---------------------------------
Stack
"Holds function arguments and local variables and constants"
^
--------------------------------
Right?
Now my question is when heap is between data segment and stack, how there is no limitation in using new? We can allocate memory as much as we want (With an unlimited swap file :-P).