Windows memory management VirtualAlloc and Objects, all welcome

  • SpinRite v6.1 is Released!
    That's right. SpinRite v6.1 is finished and released. For the full story, please see this page in the "Pre-Release Announcements & Feedback" forum.
  • Be sure to checkout “Tips & Tricks”
    Dear Guest Visitor → Once you register and log-in:

    This forum does not automatically send notices of new content. So if, for example, you would like to be notified by mail when Steve posts an update to his blog (or of any other specific activity anywhere else), you need to tell the system what to “Watch” for you. Please checkout the “Tips & Tricks” page for details about that... and other tips!

  • Announcing “BootAble” – GRC's New Boot-Testing Freeware
    Please see the BootAble page at GRC for the whole story.
  • BootAble – FreeDOS boot testing freeware

    To obtain direct, low-level access to a system's mass storage drives, SpinRite runs under a GRC-customized version of FreeDOS which has been modified to add compatibility with all file systems. In order to run SpinRite it must first be possible to boot FreeDOS.

    GRC's “BootAble” freeware allows anyone to easily create BIOS-bootable media in order to workout and confirm the details of getting a machine to boot FreeDOS through a BIOS. Once the means of doing that has been determined, the media created by SpinRite can be booted and run in the same way.

    The participants here, who have taken the time to share their knowledge and experience, their successes and some frustrations with booting their computers into FreeDOS, have created a valuable knowledgebase which will benefit everyone who follows.

    You may click on the image to the right to obtain your own copy of BootAble. Then use the knowledge and experience documented here to boot your computer(s) into FreeDOS. And please do not hesitate to ask questions – nowhere else can better answers be found.

    (You may permanently close this reminder with the 'X' in the upper right.)


Well-known member
Jul 19, 2021
Well I thought it was pretty darn cool when the man himself responded to my last post about design patterns. (I did notice in Yosifovich’s book some of the memory management explanations where described in terms of a singleton and I imagine there are many other patterns if not called out explicitly, so that answers my question.) Sense yesterday I have busy reading from Windows Internals, Windows System Programming, Johnson Hart and Windows 10 System Programming, Pavel Yosifovich and A little bit of Windows Via C/C++. Mostly what I was reading the past day was the memory management features of Windows. I still don’t understand the difference between reversed and committed memory, because they sound and make me think they are the same thing. I think I understand paging, 4KB or larger blocks of virtual memory stored in the swap/paging file and they page-out and page-in to psychical memory. I noted there was something called a translation lookaside buffer that is some kind of mapping virtual and physical memory that I need to examine more closely. It like in one of the sample application (mini excel), I think they were expending the memory used using the VirtualAlloc functions. Little piece by piece as more cells need more memory. I did notice on the allocation type parameter of VirtualAlloc it has eight bit flags for various options commit and reserve being the first two listed. That made me think of what Steve replied with in my design patterns post, when he said server objects are allocated by the OS and then their pointers are added to a list. It made me think of both VirtualAlloc and HeapAlloc functions. I am wondering if that is what is used for the OS allocation? The DNS Benchmark must use server objects for its list of DNS servers?

I guess with managed languages I never thought about this at this level, I have used constructors and de-constructors in C++ (college, not work). I suppose if one were making use of objects in assembly one would have to allocate room for them as they are needed and then clean that up when finished. Again that makes me think of VirtualAlloc and VirtualFree. So with both HeapAlloc, and VirtualAlloc, VirtualAlloc is more fine grained.

The other stuff I picked up was that win32 is just one (most popular) subsystem of windows. I think it is made up of kernel32.dll, advapi32.dll, user32.dll, gdi32.dll and CSRSS.exe, likely possibly more. I’ve try opening most of these in dependency walker and that is interesting to me. I have also opened NTDLL.dll in dependency walker and the functions are using the naming convention described for the kernel. Very interesting to me.

The DNS Benchmark must use server objects for its list of DNS servers?
You're right. I had forgotten about the DNS Benchmark. I'm sure you're right that the Benchmark is doing the same thing. "Objects" are generally the best way to manage many "things" that are all very similar... like the progress and history of all of those DNS servers that the Benchmark is querying independently.
  • Like
Reactions: Barry Wallis