I want my program to not use virtual memory whatsoever. Is there anyway I can accomplish this without just turning virtual memory off. I tried turning it off but that caused alot of problems. Im using Win98 and VC6
I want my program to not use virtual memory whatsoever. Is there anyway I can accomplish this without just turning virtual memory off. I tried turning it off but that caused alot of problems. Im using Win98 and VC6
C Code. C Code Run. Run Code Run... Please!
"Love is like a blackhole, you fall into it... then you get ripped apart"
Why on earth would you want to do this? I doubt you could turn it off completely
I have a program that uses a lot of memory and it slows to a crawl once it starts going into virtual memory.
C Code. C Code Run. Run Code Run... Please!
"Love is like a blackhole, you fall into it... then you get ripped apart"
Well without virtual memory it would simply stop dead.....Originally posted by *ClownPimp*
I have a program that uses a lot of memory and it slows to a crawl once it starts going into virtual memory.
Get more ram.
If you stop it from using virtual memory and you attempt to access memory outside of what is physically there you will get a page fault which will cause your system to crash - at least in Win98 it will cause it to become unstable.
Virtual memory is not a direct function of the OS it is a function of protected mode on the CPU which the OS manages. Intel created paging for this very reason. Programs that normally would crash won't, but it does introduce a whole new set of problems but I won't go into them here.
The OS does monitor the paging mechanism and Windows is in close communication with the system- it can turn it off but it doesn't- so that it does not cause page faults - but as far as I understand my Intel docs, paging to virtual memory is a function of protected mode.
In the old days you could effectively turn off the paging mechanism by either locking the memory or by using a DPMS that did not use paging. Obviously Windows 'DPMS' uses paging and to turn it off would be nearly impossible. The only way I know to do it is to set your virtual memory size at 0 MB, if possible. But I'm not resposible for what happens when you do that.
Get some more RAM.
looking through my code I noticed a missing &'s for huge list parameters (yikes!) and a couple more missing findclose's (double yikes!, I always forget those). Havent tested the code with those fixes but hopefully that will fix the problem. I knew there was something wrong since I knew there was no way my program could be using up all my 98MB's of ram (yes, I know I need to get some more ram--make that a new computer )
C Code. C Code Run. Run Code Run... Please!
"Love is like a blackhole, you fall into it... then you get ripped apart"
You can still lock memory pages into memory if you are using WinXP (and have sufficient rights of course), but it is strongly discouraged for anything but drivers that need the memory there and then and can't wait for a possible page fault to fetch the ram back from disk.