Topic: Does GFortran ever run out of stack or heap space?

I understand that dynamic storage works by shoving dynamic arrays ALLOCATEd at runtime onto the stack, or is it the 'heap'.  My MAIN questions are,

Is this correct?

Can GFortran run out of stack or
heap space when doing this?

if so, is there anything that can
be done to prevent this problem
in the source code or instructions
to the compiler?

This is not a problem that I've encountered but I am concerned in case I do, because I am developing a program that may need a megabyte or three of dynamic array storage (which I take to be possible in a virtual memory Win Doze environment).

CAN ANYONE help with this?
I have also a secondary question.  What on earth is meant by the 'heap'?
---
John