malloc returns memory or virtual address space

前端 未结 15 1820
攒了一身酷
攒了一身酷 2021-01-31 06:36

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

15条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-31 07:09

    Kernel and user space work with virtual addresses (also called linear addresses) that are mapped to physical addresses by the memory management hardware. This mapping is defined by page tables, set up by the operating system.

    Go through this link on Memory Allocation.

提交回复
热议问题