Does malloc allocate a block of memory on the heap or should it be called Virtual Address Space?
Am I being picky calling it Virtual Address Space or this just the legac
All processes run within its own virtual address space. Each access to memory is mediated by the memory management unit. If memory is mapped, the data is either loaded or stored from the corresponding physical address. If no memory is mapped to the specified address, the (Memory Management Unit (MMU) will trigger an exception.
Malloc manages a bunch (or perhaps even just a fraction) of mapped memory pages. These pages are known as the heap. When one requests a number of bytes from malloc, malloc will either find that memory within the pages that it already manages or it will ask the operating system (using either brk or mmap on linux). This is totally transparent to the user of malloc.
So the two concepts are totally orthogonal. Processes access virtual memory which the MMU may translate into a physical address and the heap is the block of memory managed by malloc.