|
-
May 5th, 1999, 05:56 AM
#1
How to prevent app's code from being swaped to disk
I need to declare that both data and code segments can not be swaped to disk.
How to do it in MFC based app.
Thanking in anticipation.
Adam
-
May 5th, 1999, 10:39 AM
#2
Re: How to prevent app's code from being swaped to disk
Make .DEF file and write entry:
CODE PRELOAD
Do not ......... never mind
-
May 12th, 1999, 05:50 AM
#3
Re: How to prevent app's code from being swaped to disk
I've done what you suggested and it seems to be a good way, but had a linker warning:
CODE statement not supported for the target platform; ignored.
I'm using VC++ 6.0 and Win98 or NT.
Unfortunately MSDN does not explain clerly which statements are supported and which are not.
Adam
Thanks
-
May 12th, 1999, 05:55 AM
#4
Re: How to prevent app's code from being swaped to disk
IMHO PRELOAD only preloads code (as the name implies). NONDISCARDABLE is the "right" keyword for avoiding discarding of segments.
-
June 13th, 1999, 09:08 PM
#5
Re: How to prevent app's code from being swaped to disk
Unfortunately, CODE NONDISCARDABLE flag is ignored by windows (as you found out) for applications. However, this is not true for DLLS. Thus, the code you want to prevent from being swapped out, put that in a DLL. Then use the NONDISCARDABLE flag.
Hope this helps.
Vali
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|