PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Best way to resize a VirtualAlloc block?

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
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>
Thanks refractor.

I'll try that!

Regards,
Kornalius