Tech Interview Series
What Happens When You malloc 2 GB but Don’t Use It?
malloc reserves virtual memory, not physical memory:
When you call malloc(2GB), the operating system reserves 2 GB of address space for your process in the virtual memory.
No physical RAM is allo...