文件名称:Memory_allocation

  • 所属分类:
  • Windows编程
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2012-11-26
  • 文件大小:
  • 9kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • moond******
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

本实验只设计一个大空闲内存区域,起始地址为0,大小为900。

程序运行后,提示用户选择内存分配方式,1---单一分区内存分配,2---多分区内存分配。

在单一分区方式中,一次只接受一个进程的分配请求,其中进程号以及进程所申请分配内存大小均随机产生。并进行错误检查及提示。

在多分区方式中,采用首次适应方法模拟内存分配。当有请求时,检查到有空闲分区且请求内存小于空闲内存大小时,即进行首次适应法分配。对于分配后利用完的空间进行回收处理,以便于下次分配使用。

本次主程序中,预先设定好分配及回收顺序,随机产生进程号以及请求空间大小,模拟内存分配。-In this study, only the design of a large free memory area starting at address 0, size 900.

Running the program prompts the user to select the memory allocation of a single partition memory allocation, 1, 2------ multi-partitioned memory allocation.

In a single partition mode, accepts only one request for the allocation process, in which the process number and process for the allocation of memory size are randomly generated. And check for errors and hints.

In a multi-partition mode, with the first simulation to adapt to memory allocation. When a request, check to request a free partition and the size of free memory when the memory is less than that for the first time to adapt to law distribution. For use after the completion of the space allocated for recycling to use in the next allocation.

The main program, the pre-allocation and recovery of good order, the process of randomly generated number, and request space to simulate the memory allocation.
(系统自动生成,下载前可以参看下载内容)

下载文件列表

Memory_allocation\allocation.c

.................\allocation.exe

Memory_allocation

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org