Reputation: 77
I want to allocate memory on specified address but failed.
-> GetLastError()=487, Attempt to access invalid address.
VirtualAlloc((void*)from, len, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
My program will call this many times, some are ok and some failed.
One failed example: from = 0x405000, len=0x2000
I use CheatEngine to check my program memory region I found that [0x405000-0x407000] are MEM_FREE!!! Why did it failed?
cheatengine screenshot : https://i.sstatic.net/1Xow0.png
Upvotes: 0
Views: 378