.. _virt_address_space: The Virtual Memory Address Space ---------------------------------- .. index:: logical addresses, virtual addresses We have already discussed how the :term:`logical address` are referenced by the program as it runs, but the :ref:`mmu` calculates the :term:`physical address` before loading the address on to bus. With a virtual memory management system, the logical address space becomes a virtual address space that uses the full range of memory addresses for each process (0 to 4 GB for a 32 bit system). The virtual memory address space for each process is quite **sparse**. Recall what the contiguous address space for a process looks like. If address space is sparse, then the heap is quite large, which mean that the stack is unlikely to grow into other memory. A large heap leaves plenty of room for dynamically allocated memory and also for the memory addresses of shared libraries (called DLLs in Windows). .. figure:: local_mem_map.png :align: center The stack for each process grows down toward the global memory at the lower addresses. Thus the stack grows into the heap.