I'm trying to enable page heap for a small application using GFlags but for some reason it doesn't work.
I've written a small C++ application that all it does is corrupt the heap memory:
int* a;
a= (int*)malloc(1);
*a= 8888800;
return 0;
When running this code the application does not crash. But with page heap enabled I would expect it to, at the third line.
I suspect I didn't not activate GFlags correctly but can't figure out the problem. After running the GFlags exe in the image file tab I copied the path to my exe and marked the enable page heap and stop on exception options. I checked in the CMD and saw the page heap was enabled. What could be the problem?