VirtualAlloc is not a heap. It is a page allocator. Pages are rather large, often 4KB. VirtualAlloc cannot be used to allocate part of a page. As such you're wasting space for small allocations by allocating entire pages, and you're also not optimizing for the case where the alignment is less than the size of a page so you can just allocate some pages and assume they have the correct alignment.