Skip to content

About

C 语言动态分区内存管理模拟器,支持 First Fit、Best Fit、Worst Fit、回收与紧凑化。

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

动态分区内存管理模拟器

操作系统课程实践项目。命令行程序使用双向链表模拟可变分区的分配、回收与紧凑化,提供 First Fit、Best Fit 和 Worst Fit 三种分配策略。

编译与运行

需要支持 C99 的编译器。在项目目录执行:

gcc -std=c99 -o memory-allocation-simulator partitionstorage.c
./memory-allocation-simulator

Windows 下可将输出文件命名为 memory-allocation-simulator.exe。

启动后输入总内存大小(5–16384 KB)并选择一种分配策略,再通过菜单分配、回收、整理或查看分区。查看操作显示分区表、利用率、外部碎片率和 50 格内存映射。

程序按分区号回收内存;分区号会在拆分、合并和紧凑化后重新编号。

About

C 语言动态分区内存管理模拟器,支持 First Fit、Best Fit、Worst Fit、回收与紧凑化。

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages