Skip to main content
GameDev.net gamedev.net
🔒 Locked

locking program code from paging

Started by caesar4 Sep 4, 2006 at 11:42 AM 0 replies 750+ views
Original Post
caesar4
caesar4
how do i find the virtual memory range taken up by my code? the idea is to invoke VirtualLock() on that memory range, such that windows does not move it to the page file, in other words, i want to lock the code (instructions) of my app in RAM
Cartman's definition of sexual harrasement:"When you are trying to have intercourse with a lady friend, and some other guy comes up and tickles your balls from behind"(watch South Park, it rocks)
AbandonedAccount
AbandonedAccount
Assuming C/C++ you can make a couple of labels, then use inline ASM to store them. For example:
point1://some codepoint2:unsigned int cp1,cp2;unsigned int oEdx;_asm mov oEdx, edx;_asm mov edx, point1;_asm mov cp1, edx;_asm mov edx, point2;_asm mov cp2, edx;_asm mov edx, oEdx;


Please make sure you know what you're doing. There are very few reasons you should be messing with this stuff.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.