Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Tue, 19 Aug 2008 12:18:02 -0700,    group: microsoft.public.win32.programmer.wince        back       


Making an application non-pageable   
Hi

I was wondering if there is a way to tell the kernel to not page a specific 
application.

I have read this article:
http://blogs.msdn.com/ce_base/archive/2008/01/19/Paging-and-the-Windows-CE-Paging-Pool.aspx

And, it suggests a method for making all applications non-pageable or a 
method for making a section or sections of a specific application 
non-pageable. 

I have tried the first method, but I find that the system memory consumption 
is too high.  

The second method may be acceptable, but I would perfer to make the entire 
application non-pageable instead of doing this by sections.

Is there a method for doing this?

Thank you,

Tom
date: Tue, 19 Aug 2008 12:18:02 -0700   author:   Tom K

RE: Making an application non-pageable   
You can set the 'M' flag of the binary image builder (.bib) file to force 
your application into an non-pageable mode.

for example,
app.exe $(_FLATRELEASEDIR)\app.exe NK SHM

For the section non-pageable, you can refer to the codes below.

/***************************************/
#pragma comment(linker, "/section:.no_page,ER!P")
#pragma code_seg(push, ".no_page")
XXX_PowerDown()
{	//Perform single-threaded power off logic	}
XXX_PowerUp()
{	//Perform single-threaded power on logic	}
#pragma code_seg(pop)
/***************************************/

"Tom K" wrote:

> Hi
> 
> I was wondering if there is a way to tell the kernel to not page a specific 
> application.
> 
> I have read this article:
> http://blogs.msdn.com/ce_base/archive/2008/01/19/Paging-and-the-Windows-CE-Paging-Pool.aspx
> 
> And, it suggests a method for making all applications non-pageable or a 
> method for making a section or sections of a specific application 
> non-pageable. 
> 
> I have tried the first method, but I find that the system memory consumption 
> is too high.  
> 
> The second method may be acceptable, but I would perfer to make the entire 
> application non-pageable instead of doing this by sections.
> 
> Is there a method for doing this?
> 
> Thank you,
> 
> Tom
date: Tue, 19 Aug 2008 19:02:08 -0700   author:   C.L

RE: Making an application non-pageable   
Thanks for the tip about the bib file, but unfortunately that method won't do 
either.   We build and release our kernel seperately from the applications 
that actually run on our platform.  Updating the kernel in our device is not 
easy (and extremely time consuming).

Is there another way of telling the system to not page an exe?  Perhaps a 
registry entry that tells the loader to not page?


"C.L" wrote:

> You can set the 'M' flag of the binary image builder (.bib) file to force 
> your application into an non-pageable mode.
> 
> for example,
> app.exe $(_FLATRELEASEDIR)\app.exe NK SHM
> 
> For the section non-pageable, you can refer to the codes below.
> 
> /***************************************/
> #pragma comment(linker, "/section:.no_page,ER!P")
> #pragma code_seg(push, ".no_page")
> XXX_PowerDown()
> {	//Perform single-threaded power off logic	}
> XXX_PowerUp()
> {	//Perform single-threaded power on logic	}
> #pragma code_seg(pop)
> /***************************************/
> 
> "Tom K" wrote:
> 
> > Hi
> > 
> > I was wondering if there is a way to tell the kernel to not page a specific 
> > application.
> > 
> > I have read this article:
> > http://blogs.msdn.com/ce_base/archive/2008/01/19/Paging-and-the-Windows-CE-Paging-Pool.aspx
> > 
> > And, it suggests a method for making all applications non-pageable or a 
> > method for making a section or sections of a specific application 
> > non-pageable. 
> > 
> > I have tried the first method, but I find that the system memory consumption 
> > is too high.  
> > 
> > The second method may be acceptable, but I would perfer to make the entire 
> > application non-pageable instead of doing this by sections.
> > 
> > Is there a method for doing this?
> > 
> > Thank you,
> > 
> > Tom
date: Wed, 20 Aug 2008 07:04:02 -0700   author:   Tom K

RE: Making an application non-pageable   
Do you have the source codes of the application?
If yes, you can add the pre-compile instructions as below to make your 
application non-pageable.

#pragma comment(linker, "/section:.no_page,ER!P")
#pragma code_seg(push, ".no_page")
/// Application source codes.
#pragma code_seg(pop)

"Tom K" wrote:

> Thanks for the tip about the bib file, but unfortunately that method won't do 
> either.   We build and release our kernel seperately from the applications 
> that actually run on our platform.  Updating the kernel in our device is not 
> easy (and extremely time consuming).
> 
> Is there another way of telling the system to not page an exe?  Perhaps a 
> registry entry that tells the loader to not page?
> 
> 
> "C.L" wrote:
> 
> > You can set the 'M' flag of the binary image builder (.bib) file to force 
> > your application into an non-pageable mode.
> > 
> > for example,
> > app.exe $(_FLATRELEASEDIR)\app.exe NK SHM
> > 
> > For the section non-pageable, you can refer to the codes below.
> > 
> > /***************************************/
> > #pragma comment(linker, "/section:.no_page,ER!P")
> > #pragma code_seg(push, ".no_page")
> > XXX_PowerDown()
> > {	//Perform single-threaded power off logic	}
> > XXX_PowerUp()
> > {	//Perform single-threaded power on logic	}
> > #pragma code_seg(pop)
> > /***************************************/
> > 
> > "Tom K" wrote:
> > 
> > > Hi
> > > 
> > > I was wondering if there is a way to tell the kernel to not page a specific 
> > > application.
> > > 
> > > I have read this article:
> > > http://blogs.msdn.com/ce_base/archive/2008/01/19/Paging-and-the-Windows-CE-Paging-Pool.aspx
> > > 
> > > And, it suggests a method for making all applications non-pageable or a 
> > > method for making a section or sections of a specific application 
> > > non-pageable. 
> > > 
> > > I have tried the first method, but I find that the system memory consumption 
> > > is too high.  
> > > 
> > > The second method may be acceptable, but I would perfer to make the entire 
> > > application non-pageable instead of doing this by sections.
> > > 
> > > Is there a method for doing this?
> > > 
> > > Thank you,
> > > 
> > > Tom
date: Wed, 20 Aug 2008 20:58:05 -0700   author:   C.L

RE: Making an application non-pageable   
I guess the pragma method is the only way.  I do have the source, but I was 
hoping to avoid doing this as the source is spread across many files.

Thanks for the help.
date: Tue, 26 Aug 2008 11:13:09 -0700   author:   Tom K

RE: Making an application non-pageable   
Also, another thought just occurred to me...

If the process that I am trying to make non-pageable calls code in a dll 
then how can I guarantee that that code is not paged?

I assume that the answer is to recompile any dlls that the process uses as 
well?
date: Tue, 26 Aug 2008 11:15:02 -0700   author:   Tom K

Re: Making an application non-pageable   
You can load a DLL using LoadDriver, rather than LoadLibrary, and that will 
assure that you can make it non-pageable.  In fact, that's what I'd do for 
the whole problem.  Have the application EXE be only stuff that can be 
paged.  Load DLLs for everything else.

By the way, I don't see where you told us what version of CE we're talking 
about...

Paul T.

"Tom K"  wrote in message 
news:30B561C2-C4AE-4C68-8F02-B96A5078BE73@microsoft.com...
> Also, another thought just occurred to me...
>
> If the process that I am trying to make non-pageable calls code in a dll
> then how can I guarantee that that code is not paged?
>
> I assume that the answer is to recompile any dlls that the process uses as
> well?
date: Tue, 26 Aug 2008 11:39:34 -0700   author:   Paul G. Tobey [eMVP] p space tobey no spam AT no instrument no spam DOT com

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us