内存管理实验().pptVIP

  • 10
  • 0
  • 约6.99千字
  • 约 22页
  • 2017-08-12 发布于河南
  • 举报
1. 功能介绍 1 - Set memory size (default=1024) 2 - Select memory allocation algorithm 3 - New process 4 - Terminate a process 5 - Display memory usage 0 - Exit 2. 主要数据结构 -1 内存空闲分区的描述 /*描述每一个空闲块的数据结构*/ struct free_block_type{ int size; int start_addr; struct free_block_type *next; }; /*指向内存中空闲块链表的首指针*/ struct free_block_type *free_block; 2. 主要数据结构 - 2 描述已分配的内存块 /*每个进程分配到的内存块的描述*/ struct allocated_block{ int pid; int size; int start_addr; char process_name[PROCESS_NAME_LEN]; struct allocated_block *next; }; /*进程分配内存块链表的首指针*/ struct allocated_block *allocated_blo

文档评论(0)

1亿VIP精品文档

相关文档