Memory Allocation技术实现细节

需要实现执行分配的模拟机制,以及对存储器布局的压缩操作。模拟将尝试分配从存储器的最低地址(即从0)开始到最高地址的块。每个区块当内存没有空间容纳新块或相同的块ID时,分配可能会失败已存在于内存中。尝试解除分配不在中的块时,解除分配可能会失败记忆。当生成任何InstructionException时,您也应该作为argument此时可能的最大可分配内存,即的大小当时内存中最大的空闲插槽。请注意,此值在大多数情况下不是等于总可用内存。

Assignment 2: Memory Allocation

In this assignment, you need to simulate contiguous memory allocation using first fit, best fit,

and worst fit strategies. Refer to Chapter 9.2.2 for more information about them.

Problem statement:

In this assignment, you need to implement a simulation mechanism that performs allocations,

deallocations, and compact operations on a memory layout. The simulation will try to allocate

blocks starting from the lowest addresses of memory (i.e., from 0) to the highest ones. Each block

will have an integer ID. You can use any data structure you see fit to represent and handle your

memory, as long as your code imports el

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值