文件名称:Memory_allocation
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:9.11kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
本实验只设计一个大空闲内存区域,起始地址为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.
程序运行后,提示用户选择内存分配方式,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
Memory_allocation/allocation.exe
Memory_allocation
Memory_allocation/allocation.exe
Memory_allocation
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.