2

I am trying to learn virtual function uses and I couldn't understand that where the virtualAlloc function reserves memory? in the process address space where the process loaded? or in the process virtual memory(paging file)? or in the unallocated area in paging file, if it is unallocated area, how does it added to the calling process?.

Misra
  • 21
  • 1
  • Yes, in the process address space. Yes, backed by the paging file. Yes, in the unused space of the paging file, growing it if necessary. It is the kernel's job to allocate the page descriptors, you don't allocate RAM until you access the address space. HeapAlloc is not different, it merely sub-divides the space provided by VirtualAlloc, ensuring that small allocations don't cause too much fragmentation. SO is not much of a substitute for an introductory book about operating system design. – Hans Passant Mar 20 '18 at 15:45

1 Answers1

0

in the process virtual memory(paging file) This can help you Microsoft: virtualAlloc