文件名称:memorylink
介绍说明--下载内容均来自于网络,请自行研究使用
模拟动态存储管理 一、 题目 编制一个模拟动态存储管理的程序,设用一个单向链表HA表示空闲空间链;用一个单向链表HB表示已占用空间链。设链表结构如下: 起始地址 ( 正整数,大于0 ) 本块单元数( 正整数,大于0 ) 链域 (指向下一个结点的指针) 1. 在键盘上输入起始地址,本块单元数,建立起HA,HB两链表初态(输 入起始地址为0时结束); 2. 输出HA,HB两链(起始地址,单元数); 3. 输入起始地址,在HB链中撤消所对应的结点,撤消结点后输出HB链; 4. 将撤消的结点并入HA链( 按起始地址从小到大次序加入 ); 1 ) 当被撤消的结点没有左邻结点,右邻结点和它相连,则在HA链加入; 2 ) 当被撤消的结点有做邻结点与它相连,则把它与左邻结点合并; 3 ) 当被撤消的结点有右邻结点和它相连,则把它与右邻结点合并; 4 ) 当被撤消的结点有左,右邻结点和它相连,则把它与左,右邻结点合并; 5 ) 继续第三点,直到HB链为空或输入的起始地址为0为止; 6 ) 输出HA,HB链。-simulated a dynamic storage management, the subject prepared a simulation of the dynamic storage management procedures established with a one-way linked list of HA expressed idle space chain; Using a one-way linked list, said HB chain occupied space. Based Chain structured as follows : initial address (a positive integer greater than 0) of the unit block (positive integers, greater than 0) chain domain (at a node where the target) 1. Keyboard input in the initial address, the number of block units, and establish HA, HB 2 Chain initial state (transmission into the starting addresses of the end of 0005); 2. output HA, HB 2 chain (initial address, unit number); 3. initial input address, the withdrawal of HB chain corresponding to the node, node withdrawn output HB chain; 4. to revoke the node
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 220236memorylink.rar 列表 memorylink memorylink\LINKLIST.HPP memorylink\LINKLIST.CPP memorylink\memorylink.cpp