Virtual Memory
Windows offers three distinct types of memory to applications: virtual memory, heaps, and shared memory. Virtual memory is best used for managing large arrays or collections of objects or structures of varying sizes. It is the primary mechanism by which SQL Server allocates memory and is the focus of this section.
You allocate virtual memory using the VirtualAlloc and VirtualAllocEx API functions. VirtualAlloc allocates memory only in the calling process's address space; VirtualAllocEx can allocate memory in another process's address space. VirtualAlloc is by far the more commonly used of the two, and it's the one we'll use throughout this chapter.
Pages in virtual memory are always in one of three states: free, reserved, or committed. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access