Page 1 of 1

Best way to resize a VirtualAlloc block?

PostPosted: Apr 8, 2004 @ 6:53pm
by kornalius
I want to be able to resize a memory block allocated with VirtualAlloc. I would like this block to dynamicly grow with the demand. :D

Regards,
Kornalius

PostPosted: Apr 8, 2004 @ 7:20pm
by refractor
Look at the MEM_RESERVE flag.

Really I think you should reserve one large block of virtual address space, then commit it as you use it (mark the pages as PAGE_GUARD) using VirtualProtect.

<a href="http://msdn.microsoft.com/library/en-us/memory/base/creating_guard_pages.asp">This should help</a>

PostPosted: Apr 9, 2004 @ 5:45pm
by kornalius