Linux is an on demand memory system. The malloc() call immediately returns virtual memory, which is only promoted to real memory later when it is used via a page fault.