Address Space Layout

In a typical Unix process address space, which direction does the stack grow and which direction does the heap grow?

A

Both grow toward each other from the same starting point

B

Both grow upward (toward higher addresses)

C

Stack grows downward (toward lower addresses); heap grows upward (toward higher addresses)

D

Stack grows upward (toward higher addresses); heap grows downward (toward lower addresses)