So in xdbg in the memory map, i can see that some segments are mapped and some are private, at first i thought maybe mapped means it has a corresponding file on disk and its the mapped version of that, but there are so many mapped segments which don't have a corresponding file, some of which are reserved

so i have two questions:

  1. What is the difference between mapped and private segments?

  2. What are these (reserved) sections? what does reserved mean?

    enter image description here

1 Answer 1

  1. Private flag is indicator that the particular range of memory isn't shared with any other process

  2. Reserved section means that the region of virtual memory is reserved, but not commited yet. This means that the virtual memory region isn't mapped to the physical memory but any other memory allocation calls won't occupy that space until it's released. You may also notice that the debugger doesn't show any protection on the reserved memory regions, this is because the memory needs to be commited in order to be used. To commit the memory you may call the VirtualAlloc again, this time with the MEM_COMMIT flag, now you can access the commited memory and then it will be allocated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.