I'd like to page-out certain memory.

Once a while , I’d like to check the module, which accesses paged-memory,
works well at certain circumstances,but it’s hard to check about it, because
it usually page-in , not page-out.

therefore, I’d like to page-out certain memory compulsory, for only test ,
not product.

anyone has any-idea either tool or functions ?

Andy,

I don’t understand your intend completely, but some options of
DriverVerifier could do the job.

A further option is adding a REG_DWORD value ‘ProtectNonPagedPool’ of 1 to
the registry key
HKLM\SYSTEM\CurrentControlSet\Control\SessionManager\Memory Management.
After reboot the system will unmap all freed nonpaged pool.

Regards,
Volker

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Andy Jung
Sent: Monday, August 22, 2005 9:51 AM
To: Windows System Software Devs Interest List
Subject: {Spam? 05.23} [ntdev] I’d like to page-out certain memory.

Once a while , I’d like to check the module, which accesses
paged-memory,
works well at certain circumstances,but it’s hard to check
about it, because
it usually page-in , not page-out.

therefore, I’d like to page-out certain memory compulsory, for
only test ,
not product.

anyone has any-idea either tool or functions ?


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently
subscribed to ntdev as: xxxxx@baslerweb.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Use the Forcing IRQL Checking option of driver verifier.

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Andy Jung
Sent: Monday, August 22, 2005 3:51 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] I’d like to page-out certain memory.

Once a while , I’d like to check the module, which accesses
paged-memory, works well at certain circumstances,but it’s
hard to check about it, because it usually page-in , not page-out.

therefore, I’d like to page-out certain memory compulsory,
for only test , not product.

anyone has any-idea either tool or functions ?


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
xxxxx@lists.osr.com

Thanks for your respons.

I think I misdescribe, I’d describe again.

for example)

in Application)
PCHAR p = VirtualAlloc(NULL, 0x2000, MEM_COMMIT | MEM_RESERVED,
PAGE_READWRITE);

p[0] = ‘a’;
p[0x1000] = ‘b’;

After That point, I wanna page-out at &p[0]
but I don’t think there are any API to force pages-out of memory.

Are there any idea ? (such as any windbg commnad)

as Marked mentioned, using verifer would be good, but it need a time,
and if the memory already be in page, it cannot archive the my purpose…

Thanks


“Mark Roddy” wrote in message news:xxxxx@ntdev…
> Use the Forcing IRQL Checking option of driver verifier.
>
> =====================
> Mark Roddy DDK MVP
> Windows 2003/XP/2000 Consulting
> Hollis Technology Solutions 603-321-1032
> www.hollistech.com
>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com
>> [mailto:xxxxx@lists.osr.com] On Behalf Of Andy Jung
>> Sent: Monday, August 22, 2005 3:51 AM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] I’d like to page-out certain memory.
>>
>> Once a while , I’d like to check the module, which accesses
>> paged-memory, works well at certain circumstances,but it’s
>> hard to check about it, because it usually page-in , not page-out.
>>
>> therefore, I’d like to page-out certain memory compulsory,
>> for only test , not product.
>>
>> anyone has any-idea either tool or functions ?
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as:
>> xxxxx@hollistech.com To unsubscribe send a blank email to
>> xxxxx@lists.osr.com
>>
>
>
>

Write a second test program that consumes the heck out of memory.

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Andy Jung
Sent: Monday, August 22, 2005 7:37 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] I’d like to page-out certain memory.

Thanks for your respons.

I think I misdescribe, I’d describe again.

for example)

in Application)
PCHAR p = VirtualAlloc(NULL, 0x2000, MEM_COMMIT |
MEM_RESERVED, PAGE_READWRITE);

p[0] = ‘a’;
p[0x1000] = ‘b’;

After That point, I wanna page-out at &p[0] but I don’t think
there are any API to force pages-out of memory.

Are there any idea ? (such as any windbg commnad)

as Marked mentioned, using verifer would be good, but it need
a time, and if the memory already be in page, it cannot
archive the my purpose…

Thanks



“Mark Roddy” wrote in message
> news:xxxxx@ntdev…
> > Use the Forcing IRQL Checking option of driver verifier.
> >
> > =====================
> > Mark Roddy DDK MVP
> > Windows 2003/XP/2000 Consulting
> > Hollis Technology Solutions 603-321-1032 www.hollistech.com
> >
> >> -----Original Message-----
> >> From: xxxxx@lists.osr.com
> >> [mailto:xxxxx@lists.osr.com] On Behalf Of Andy Jung
> >> Sent: Monday, August 22, 2005 3:51 AM
> >> To: Windows System Software Devs Interest List
> >> Subject: [ntdev] I’d like to page-out certain memory.
> >>
> >> Once a while , I’d like to check the module, which accesses
> >> paged-memory, works well at certain circumstances,but it’s hard to
> >> check about it, because it usually page-in , not page-out.
> >>
> >> therefore, I’d like to page-out certain memory compulsory,
> for only
> >> test , not product.
> >>
> >> anyone has any-idea either tool or functions ?
> >>
> >>
> >>
> >> —
> >> Questions? First check the Kernel Driver FAQ at
> >> http://www.osronline.com/article.cfm?id=256
> >>
> >> You are currently subscribed to ntdev as:
> >> xxxxx@hollistech.com To unsubscribe send a blank email to
> >> xxxxx@lists.osr.com
> >>
> >
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@hollistech.com To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>

If you have a main window and you are in XP, then minimize the window or
explicitly call ShowWindow() with minimize flag. You can also request a
working set trim by SetProcessWorkingSetSize() (pass -1 in param2 and
3).

Then make physical memory scarce, by either booting with less RAM or run
a memory-eating program. Note that these are all indirect methods for
what you are attempting to achieve (which is a tad bit strange for a
user-mode app ;))

> therefore, I’d like to page-out certain memory compulsory, for only test ,

not product.

Driver Verifier in some modes does this on each spinlock acquisition.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com