user101847
user101847

Reputation: 71

How does the operating system determine which region to allocate when lpAddress is null in VirtualAlloc

When the lpAddress parameter to a VirtualAlloc function call is null, how does the OS determine which virtual address space region to allocate?

Upvotes: 1

Views: 499

Answers (1)

Khaled.K
Khaled.K

Reputation: 5940

When VirtualAlloc function is given NULL for lpAddress parameter, the function will allocate in another Virtual Page ahead, and the allocation size will be rounded to that page boundary.

Resources:

Hope this helps

Upvotes: 1

Related Questions