I have trouble grasping how memory allocators work. As far as I understand mapping physical memory to the heap of a program would require the allocator to know where the heap’s start and end virtual address are. i.e. in linux mmap takes a pointer argument – address, to which it maps a physical memory region. My question is how do I acquire these memory addresses?
New contributor
Martician is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.