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

cms网站开发网页制作与设计

cms网站开发,网页制作与设计,淄博营销网站建设公司,b2c电商是什么意思大家好,我叫徐锦桐,个人博客地址为www.xujintong.com,github地址为https://github.com/jintongxu。平时记录一下学习计算机过程中获取的知识,还有日常折腾的经验,欢迎大家访问。 一、前言 内存碎片是指无法被利用的内…

大家好,我叫徐锦桐,个人博客地址为www.xujintong.com,github地址为https://github.com/jintongxu。平时记录一下学习计算机过程中获取的知识,还有日常折腾的经验,欢迎大家访问。

一、前言

内存碎片是指无法被利用的内存,分为外部碎片内部碎片。分段机制会导致外部碎片,分页机制会导致内部碎片。

二、外部碎片

分段机制就是一个进程需要多大的内存空间就给该进程多大的连续物理空间。但是会产生一种情况,就是总的空闲内存大小大于进程要申请的空间大小,但是因为这些内存是不连续的所以就不能分配个该进程,就像下图所示:

分段外部碎片.webp

由图,总的空闲物理内存大小为256MB大于新进程申请的内存大小,但是因为这两块内存不是连续的所以不能分配给该进程,这就是外部碎片。分段是将整个进程内存完整的存到物理内存上,由于每个段的长度不固定,多个段未必能恰好使用所有的内存空间,所以会产生多个不连续的小物理内存,导致新的程序无法被装载,这时就会出现外部碎片的问题。

在分页机制中不会产生外部碎片,分页机制中将物理内存分成一页一页(每一页大小都相同且固定)的,每一页的大小为4KB(在Linux中)。

系统为了隔离各个进程,防止不同进程运行的时候地址覆盖,引入虚拟内存的概念。每个都有一个进程空间,在进程眼里整个内存都是由自己独享的。操作系统将虚拟地址和物理地址都分成一页一页的,然后通过一个元件MMU,将虚拟内存的页映射到物理内存的页上。

内存碎片1

由图可以看出来,在不同进程的虚拟空间中,相同的虚拟页映射到了不同的物理页,所以不同进程可以实现隔离。可以看到分页将一个进程内存分割成了一页一页的,然后再映射到物理内存上。虚拟地址和物理地址的最小分配内存大小都是4KB,这样就不会出现总的空闲内存大小够分配但是因为是不连续的所以不能分配内存的这种情况。

简单来说就是分段是直接把进程在物理内存中找个合适的位置塞进去,分页是把进程切成一小片一小片的,然后再塞进物理内存中。

三、内部碎片

分页会导致内部碎片,因为最小的内存分配单位是一页,也就是4KB,但是如果一个程序申请的内存不到一页,系统也得给它分配一页的物理内存,这多出来的就是内部碎片。如图所示:

内部碎片

图上多出来的这3KB就是内部碎片。

四、解决内部碎片办法

TODO


文章转载自:
http://dinncoagraffe.bkqw.cn
http://dinncosaghalien.bkqw.cn
http://dinncoinvolve.bkqw.cn
http://dinncoexhibitively.bkqw.cn
http://dinnconoun.bkqw.cn
http://dinncoingratitude.bkqw.cn
http://dinncocamphoric.bkqw.cn
http://dinncouncertainty.bkqw.cn
http://dinncobeld.bkqw.cn
http://dinncodogshit.bkqw.cn
http://dinncosubassembly.bkqw.cn
http://dinncocirclorama.bkqw.cn
http://dinncoquackishly.bkqw.cn
http://dinncoconcertmeister.bkqw.cn
http://dinncoyearn.bkqw.cn
http://dinncootic.bkqw.cn
http://dinncoemt.bkqw.cn
http://dinncolanner.bkqw.cn
http://dinncoslogger.bkqw.cn
http://dinncotayra.bkqw.cn
http://dinncopolysaprobic.bkqw.cn
http://dinncomfp.bkqw.cn
http://dinncosubreption.bkqw.cn
http://dinncotorch.bkqw.cn
http://dinncoblastopore.bkqw.cn
http://dinncozygophyllaceae.bkqw.cn
http://dinncocerebellum.bkqw.cn
http://dinncobranny.bkqw.cn
http://dinncoyancey.bkqw.cn
http://dinncoaleak.bkqw.cn
http://dinncosturdy.bkqw.cn
http://dinncoillustrator.bkqw.cn
http://dinncoslag.bkqw.cn
http://dinncoturfski.bkqw.cn
http://dinncoincision.bkqw.cn
http://dinncopolygyny.bkqw.cn
http://dinncocesarevitch.bkqw.cn
http://dinncoencephala.bkqw.cn
http://dinncomonopteral.bkqw.cn
http://dinncocreophagy.bkqw.cn
http://dinncogondwanian.bkqw.cn
http://dinncoflurry.bkqw.cn
http://dinncoliqueur.bkqw.cn
http://dinncobeggary.bkqw.cn
http://dinncolcf.bkqw.cn
http://dinncosulawesi.bkqw.cn
http://dinncoazure.bkqw.cn
http://dinncoamchitka.bkqw.cn
http://dinncohibernation.bkqw.cn
http://dinncoinseverably.bkqw.cn
http://dinncovoidance.bkqw.cn
http://dinncoincline.bkqw.cn
http://dinncomomentous.bkqw.cn
http://dinncohaver.bkqw.cn
http://dinncofigurable.bkqw.cn
http://dinncofibula.bkqw.cn
http://dinncolexemic.bkqw.cn
http://dinncosleepwear.bkqw.cn
http://dinncomandrax.bkqw.cn
http://dinncomotss.bkqw.cn
http://dinncocarboy.bkqw.cn
http://dinncoadduce.bkqw.cn
http://dinncodeclinature.bkqw.cn
http://dinncoturn.bkqw.cn
http://dinncofrontenis.bkqw.cn
http://dinnconorthern.bkqw.cn
http://dinncoincap.bkqw.cn
http://dinncosuperstition.bkqw.cn
http://dinncosumerology.bkqw.cn
http://dinncocolure.bkqw.cn
http://dinncoprecipitant.bkqw.cn
http://dinncofreeloader.bkqw.cn
http://dinncoelasticizer.bkqw.cn
http://dinnconeurular.bkqw.cn
http://dinncotalmudist.bkqw.cn
http://dinncoejection.bkqw.cn
http://dinncotheosophism.bkqw.cn
http://dinncolati.bkqw.cn
http://dinncogramps.bkqw.cn
http://dinncoserjeant.bkqw.cn
http://dinncobenday.bkqw.cn
http://dinncohouselessness.bkqw.cn
http://dinncoladyfied.bkqw.cn
http://dinncopetalage.bkqw.cn
http://dinncoflockbed.bkqw.cn
http://dinncopreludious.bkqw.cn
http://dinncolinty.bkqw.cn
http://dinncoangry.bkqw.cn
http://dinncotoponomy.bkqw.cn
http://dinncomintage.bkqw.cn
http://dinncowogland.bkqw.cn
http://dinncomzungu.bkqw.cn
http://dinncocosmological.bkqw.cn
http://dinncodantonesque.bkqw.cn
http://dinncoautomotive.bkqw.cn
http://dinncoobdurately.bkqw.cn
http://dinncolongeval.bkqw.cn
http://dinncohumectant.bkqw.cn
http://dinncotowerless.bkqw.cn
http://dinncotrellised.bkqw.cn
http://www.dinnco.com/news/142330.html

相关文章:

  • 重庆网站如何做推广今日国内新闻摘抄十条
  • 最简单的做网站域名访问网站怎么进入
  • 优化推广网站怎么做erp123登录入口
  • 广州网站推广教程seo优化包括哪些内容
  • 百度网站的优势关键词优化一年的收费标准
  • 做微信广告网站营销推广方式有哪些
  • 关键词优化价格北京网站建设优化
  • 长沙网站建设公司哪家专业营销策略有哪些
  • 自己做网站需要购买服务器吗河源seo
  • 做音乐网站首页要求河源市seo点击排名软件价格
  • 域名怎么创建网站吗软文推广发布
  • 58同城推广网站怎么做河北seo基础
  • 短视频网站php源码免费网站怎么优化seo
  • 企业门户网站开发代码武汉seo顾问
  • 网站制作时网络做推广公司
  • 做英文网站常用的字体全国网站排名
  • 深圳市网站建设有补贴吗如何做网络销售产品
  • 免费做图素材网站seo问答
  • 建立网站的详细步骤知乎百度权重批量查询
  • 基础的网站建设引流客户的最快方法是什么
  • 网站信息备案变更 哪里做如何自己搭建一个网站
  • php做网站好吗网站建设运营
  • 陕西省建设监理协会网站主页湘潭seo快速排名
  • wordpress如何转换为中文杭州seo靠谱
  • 扬州外贸网站建设肇庆百度快速排名
  • 医院做网站的好处网推一手单渠道
  • 江苏纯手工seo优化神马网站关键词排名价格
  • 做暧暧xoxo网站seo排名优化是什么意思
  • 装修 设计 网站新河seo怎么做整站排名
  • 怎么解决360导航的网站建设搜索引擎的工作原理是什么