|
|
|
date: Tue, 19 Aug 2008 12:18:02 -0700,
group: microsoft.public.win32.programmer.wince
back
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
|
|