![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 09.04.2020 22:01 dymi6n
For question 1, I think the heap allocator allocates from higher addresses(at the end) to lower addresses(at the beginning).
and for question 2 and 3, I chose best fit for question 2 and none of the above for question 3, but not sure.
Need clear explanation for this kind of cases.
sizes between addresses = 1024, 64, 1024, 512, 1024, 128, 1024, 64, 1024
Question #1
If invoking the program as
memory 480,0,0,0
produced this output:
0 | 1024 | 1088 | 2112 | 2624 | 3648 | 3776 | 4800 | 4864 |
The 480-byte chunk was allocated at address 2144
would you conclude that the heap allocator allocates new chunks of RAM at the beginning (i. e., lower addresses) or at the end (i. e., higher addresses) of holes in memory? Why? To explain why just use a contraposition argument (e. g., if the heap allocator did X then Y would have happened, but instead Z happened).
Whatever the heap allocator does, this is what we assume it does for all subsequent questions.
Question #2
If invoking the program as
./memory 100,200,100,80
produces this output:
0 | 1024 | 1088 | 2112 | 2624 | 3648 | 3776 | 4800 | 4864 |
The 100-byte chunk was allocated at address 2524
The 200-byte chunk was allocated at address 2324
The 100-byte chunk was allocated at address 2224
The 80-byte chunk was allocated at address 3696
would you say that the heap allocator uses
first fit
best fit
worst fit
none of the above?
Question #3
If invoking the program as
./memory 40, 400, 80, 60
produces this output:
0 | 1024 | 1088 | 2112 | 2624 | 3648 | 3776 | 4800 | 4864 |
The 40-byte chunk was allocated at address 3736
The 400-byte chunk was allocated at address 2224
The 80-byte chunk was allocated at address 2144
The 60-byte chunk was allocated at address 4804
would you say that the heap allocator uses
first fit
best fit
worst fit
none of the above?
Question #4
After looking up some documentation, you find out that the heap allocator uses worst fit! What would the output of the memory program be when invoked as follows:
./memory 400, 100, 10, 10
![ansver](/tpl/images/cats/User.png)
Answers: 3
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 19:20
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 16:00
Helen is having a meeting with her colleagues in her company. they are working on the goals and objectives for the coming year. they want to ensure that these goals and objectives of the processes involved are properly evaluated. which system can helen and her colleagues apply to evaluate this? helen and her colleagues require a blank to evaluate the goals and objectives.
Answers: 2
![question](/tpl/images/cats/informatica.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 12:00
Which spreadsheet operation does a look function perform?
Answers: 1
You know the right answer?
For question 1, I think the heap allocator allocates from higher addresses(at the end) to lower addr...
Questions
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mkx.png)
Arts, 20.01.2021 21:30
![question](/tpl/images/cats/en.png)
English, 20.01.2021 21:30
![question](/tpl/images/cats/en.png)
English, 20.01.2021 21:30
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 20.01.2021 21:30
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 20.01.2021 21:30
![question](/tpl/images/cats/en.png)
English, 20.01.2021 21:30
![question](/tpl/images/cats/en.png)
English, 20.01.2021 21:30
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 20.01.2021 21:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 20.01.2021 21:30
![question](/tpl/images/cats/mkx.png)
Arts, 20.01.2021 21:30