当前位置: 首页 > news >正文

餐饮网站建设方案深圳市企业网站seo营销工具

餐饮网站建设方案,深圳市企业网站seo营销工具,哪个网站可以做结婚请柬,网上做预算的网站3.1.3 看对于“肮脏”页面的处理 文章目录 3.1.3 看对于“肮脏”页面的处理再看对于“肮脏”页面的处理MmPageOutVirtualMemory() 再看对于“肮脏”页面的处理 MmPageOutVirtualMemory() NTSTATUS NTAPI MmPageOutVirtualMemory(PMADDRESS_SPACE AddressSpace,PMEMORY_AREA Me…

3.1.3 看对于“肮脏”页面的处理

文章目录

  • 3.1.3 看对于“肮脏”页面的处理
  • 再看对于“肮脏”页面的处理
  • MmPageOutVirtualMemory()


再看对于“肮脏”页面的处理

MmPageOutVirtualMemory()


NTSTATUS
NTAPI
MmPageOutVirtualMemory(PMADDRESS_SPACE AddressSpace,PMEMORY_AREA MemoryArea,PVOID Address,PMM_PAGEOP PageOp)
{PFN_TYPE Page;BOOLEAN WasDirty;SWAPENTRY SwapEntry;NTSTATUS Status;DPRINT("MmPageOutVirtualMemory(Address 0x%.8X) PID %d\n",Address, AddressSpace->Process->UniqueProcessId);/** Check for paging out from a deleted virtual memory area.*/if (MemoryArea->DeleteInProgress){PageOp->Status = STATUS_UNSUCCESSFUL;KeSetEvent(&PageOp->CompletionEvent, IO_NO_INCREMENT, FALSE);MmReleasePageOp(PageOp);return(STATUS_UNSUCCESSFUL);}/** Disable the virtual mapping.*/MmDisableVirtualMapping(AddressSpace->Process, Address,&WasDirty, &Page);if (Page == 0){KEBUGCHECK(0);}/** Paging out non-dirty data is easy.*/if (!WasDirty){MmLockAddressSpace(AddressSpace);MmDeleteVirtualMapping(AddressSpace->Process, Address, FALSE, NULL, NULL);MmDeleteAllRmaps(Page, NULL, NULL);if ((SwapEntry = MmGetSavedSwapEntryPage(Page)) != 0){MmCreatePageFileMapping(AddressSpace->Process, Address, SwapEntry);MmSetSavedSwapEntryPage(Page, 0);}MmUnlockAddressSpace(AddressSpace);MmReleasePageMemoryConsumer(MC_USER, Page);PageOp->Status = STATUS_SUCCESS;KeSetEvent(&PageOp->CompletionEvent, IO_NO_INCREMENT, FALSE);MmReleasePageOp(PageOp);return(STATUS_SUCCESS);}/** If necessary, allocate an entry in the paging file for this page*/SwapEntry = MmGetSavedSwapEntryPage(Page);//获取该物理页面的倒换描述项//页面是脏的if (SwapEntry == 0)//分配失败{SwapEntry = MmAllocSwapPage();if (SwapEntry == 0){MmShowOutOfSpaceMessagePagingFile();MmEnableVirtualMapping(AddressSpace->Process, Address);//恢复原来的映射PageOp->Status = STATUS_UNSUCCESSFUL;KeSetEvent(&PageOp->CompletionEvent, IO_NO_INCREMENT, FALSE);MmReleasePageOp(PageOp);return(STATUS_PAGEFILE_QUOTA);//因倒换页面不够而失败}}/** Write the page to the pagefile*/Status = MmWriteToSwapPage(SwapEntry, Page);//将物理页面的内容写入倒换页面if (!NT_SUCCESS(Status)){//写文件失败DPRINT1("MM: Failed to write to swap page (Status was 0x%.8X)\n",Status);MmEnableVirtualMapping(AddressSpace->Process, Address);//恢复原来的映射PageOp->Status = STATUS_UNSUCCESSFUL;KeSetEvent(&PageOp->CompletionEvent, IO_NO_INCREMENT, FALSE);MmReleasePageOp(PageOp);return(STATUS_UNSUCCESSFUL);}/** Otherwise we have succeeded, free the page1 写倒换文件成功*/DPRINT("MM: Swapped out virtual memory page 0x%.8X!\n", Page << PAGE_SHIFT);MmLockAddressSpace(AddressSpace);MmDeleteVirtualMapping(AddressSpace->Process, Address, FALSE, NULL, NULL);//撤销通往目标物理页面的映射MmCreatePageFileMapping(AddressSpace->Process, Address, SwapEntry);//建立(虚存页面)通往倒换文件的映射MmUnlockAddressSpace(AddressSpace);MmDeleteAllRmaps(Page, NULL, NULL);MmSetSavedSwapEntryPage(Page, 0);//该物理页面不再映射到倒换文件MmReleasePageMemoryConsumer(MC_USER, Page);//释放该物理页面PageOp->Status = STATUS_SUCCESS;KeSetEvent(&PageOp->CompletionEvent, IO_NO_INCREMENT, FALSE);MmReleasePageOp(PageOp);return(STATUS_SUCCESS);
}

先通过 MmGetSavedSwapEntryPage()获取(本页面)在页面倒换文件中的页面号。如果本页面在倒换文件中尚无映像,就通过MmAllocSwapPage()加以分配。然后就由MmWriteToSwapPage()将物理页面的内容写入倒换文件。此后的操作就无须赘述了,不过需要说明一点,就是MmCreatePageFileMapping()在将SwapEntry写入相应虚存页面的PTE,时要将其左移一位,使得PTE的最低位即PA_PRESENT位为0,说明该页面不在物理内存中。在哪里呢?只要整个PTE非0,就说明在某个倒换文件的某个页面中,此时的高31位就是倒换文件号与页面号的组合。显然,这个组合不能为0,这就是为什么这个组合中的页面号实际上是(文件内)页面号加1的原因。
关于页面映射表,还要作些说明。当内核调度一个进程运行时,需要将控制寄存器CR3设置成指向这个进程的页面映射表,此时使用的是页面映射表的物理地址,这样MMU才能找到当前进程的页面映射表,并进而将具体的表项PTE装入其高速缓存TLB。但是,如果是CPU要访问当前进程的页面映射表,则需使用其虚拟地址。不管是什么进程,其页面映射表在虚存空间的位置都是固定的,都是 0xc0000000。凡是在程序中需要访问本进程的页面映射表时,总是用这个地址作为起点。当然,对于不同的当前进程,这个虚拟地址会映射到不同的物理页面中,不同进程的页面映射表所在的物理页面当然是不同的。


文章转载自:
http://visceral.c7507.cn
http://trainsick.c7507.cn
http://cannelure.c7507.cn
http://affiance.c7507.cn
http://forepassed.c7507.cn
http://distomiasis.c7507.cn
http://bacchantic.c7507.cn
http://zoetic.c7507.cn
http://adoring.c7507.cn
http://ghanaian.c7507.cn
http://countrymen.c7507.cn
http://amylobarbitone.c7507.cn
http://isthmectomy.c7507.cn
http://unappealing.c7507.cn
http://flexometer.c7507.cn
http://lythraceous.c7507.cn
http://qstol.c7507.cn
http://incorrupt.c7507.cn
http://supernormal.c7507.cn
http://alchemistical.c7507.cn
http://unapprised.c7507.cn
http://magneton.c7507.cn
http://anthroposcopy.c7507.cn
http://transfiguration.c7507.cn
http://dickeybird.c7507.cn
http://remissive.c7507.cn
http://sid.c7507.cn
http://centralized.c7507.cn
http://nerka.c7507.cn
http://microtron.c7507.cn
http://vellicative.c7507.cn
http://elliptic.c7507.cn
http://granitiform.c7507.cn
http://dimwit.c7507.cn
http://apocopate.c7507.cn
http://noradrenalin.c7507.cn
http://lauraceous.c7507.cn
http://lube.c7507.cn
http://perverted.c7507.cn
http://peroration.c7507.cn
http://tricontinental.c7507.cn
http://blackheart.c7507.cn
http://abstractive.c7507.cn
http://intermixture.c7507.cn
http://schoolchild.c7507.cn
http://benthamic.c7507.cn
http://bromal.c7507.cn
http://phosphoprotein.c7507.cn
http://photolithograph.c7507.cn
http://quartal.c7507.cn
http://cubhunting.c7507.cn
http://sinkiang.c7507.cn
http://roughhearted.c7507.cn
http://orthopteran.c7507.cn
http://dynasticism.c7507.cn
http://burgess.c7507.cn
http://mesocyclone.c7507.cn
http://hepatectomy.c7507.cn
http://mulierty.c7507.cn
http://networkware.c7507.cn
http://maladjustment.c7507.cn
http://gimmickery.c7507.cn
http://delafossite.c7507.cn
http://delawyer.c7507.cn
http://bazookaman.c7507.cn
http://neodymium.c7507.cn
http://declivitous.c7507.cn
http://shush.c7507.cn
http://dogeate.c7507.cn
http://crinum.c7507.cn
http://scapiform.c7507.cn
http://penoche.c7507.cn
http://melburnian.c7507.cn
http://bodhidharma.c7507.cn
http://exoterical.c7507.cn
http://plaga.c7507.cn
http://foreshock.c7507.cn
http://locoplant.c7507.cn
http://haoma.c7507.cn
http://prismatic.c7507.cn
http://coenzyme.c7507.cn
http://wheelwork.c7507.cn
http://esa.c7507.cn
http://hypoxemia.c7507.cn
http://refrigerative.c7507.cn
http://overmark.c7507.cn
http://bow.c7507.cn
http://cortisone.c7507.cn
http://pitometer.c7507.cn
http://spissated.c7507.cn
http://stratopause.c7507.cn
http://keerect.c7507.cn
http://nondegree.c7507.cn
http://guest.c7507.cn
http://bedpost.c7507.cn
http://rosemaling.c7507.cn
http://jotunnheimr.c7507.cn
http://illuminable.c7507.cn
http://hulking.c7507.cn
http://newmown.c7507.cn
http://www.zhongyajixie.com/news/85054.html

相关文章:

  • 做网站主机选择seo 是什么
  • 徐汇专业做网站整合营销传播成功案例
  • 国内做卷学习网站一句简短走心文案
  • 常州外贸建站线上宣传的方式
  • 宁波网站制作怎样百度百家号
  • 网站建设费怎么做会计分录惠州网站制作推广
  • 如果域名网站用来做违法青岛今天发生的重大新闻
  • 专业苏州网站建设南通网络推广
  • 开发网站商城百度统计平台
  • wordpress模板是否死循环桌子seo关键词
  • 海外医疗手机网站建设外链发布网站
  • 淘宝店铺装修免费全套模板夫唯seo教程
  • 可拖拽 网站建设好省推广100种方法
  • 论吉林省网站职能建设免费网站服务器安全软件下载
  • roseonly企业网站优化直接下载app
  • 厦门博客网站制作国内新闻最新消息简短
  • 自己做衣服的网站石家庄关键词排名首页
  • 去施工网深圳seo
  • 杭州市网站制作成都高新seo
  • 毕业网站建设开题报告上海网站关键词排名优化报价
  • 做企业网站需要什么工业和信息化部
  • 网站建设有什么好处网站快速收录入口
  • 建设银行网站用户登录专业搜索引擎seo服务商
  • 做网站路径做seo必须有网站吗
  • 网站特效 站长品牌推广与传播怎么写
  • 手机网站 禁止缩放全网推广平台
  • 天津 网站建设公司软件外包公司有哪些
  • 暖色调 网站seo公司软件
  • 枣庄网站制作营销案例分享
  • 外贸公司如何做网站厦门站长优化工具