Pergunta de entrevista da empresa PassFort

How does memory-management work, in general? What is the heap? What can cause a stack overflow?