18.11.2014 Views

Using Virtual Memory in your application

Using Virtual Memory in your application

Using Virtual Memory in your application

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

例<br />

void ma<strong>in</strong>(){<br />

// Step 1: Reserve & COMMIT 64 KB <br />

PVOID buffer=<strong>Virtual</strong>Alloc(NULL, 64*1024,MEM_RESERVE | \<br />

MEM_COMMIT,PAGE_READWRITE);<br />

if(buffer==NULL)<br />

ShowError();<br />

// Step 2:<br />

for(<strong>in</strong>t i=0;i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!