what amount of heap , stack available program , how determine it? , dependent on compiler or pc or both?
it's "unlimited" :]. every process receives virtual address space limited cpu , os implementation. if cpu or os 32 bit, process gets possibility address ~4gb of virtual memory (even if have less ram installed in pc). on 64 bit cpu , 64 bit os, current implementations limit virtual address space 48 bit, process believes can use 256tb of memory.
the os dynamically try reserve heap , stack space process needs.