Skip to content

Instantly share code, notes, and snippets.

@mvankuipers
Created August 13, 2017 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvankuipers/56dbc80a33871a2350da21029732af52 to your computer and use it in GitHub Desktop.
Save mvankuipers/56dbc80a33871a2350da21029732af52 to your computer and use it in GitHub Desktop.
// Allocate a buffer within our process.
PVOID Private = VirtualAlloc(NULL, 4096, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
// Use the memory to make sure it's resident.
reinterpret_cast<PBYTE>(Private)[0] = 0xFF;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment