Malloc Distribution Schemes

Yes, I take a course in computer systems. I had a few questions about the various distribution schemes for implementing malloc. For explicit lists, if I implement malloc using a LIFO-like stack, what is the purpose of pointers to the previous freed memory? For example, why do you need doubly linked lists? Would duplicate link lists work just as well?

Mallock's lecture. I found this link on the Internet, you can look at slide 7 to find out what I'm talking about.

Considering the allocation scheme of individual lists, are these lists unidirectional? And also, what is a coalescence mechanism? How, for example, if 4 words are freed, would you first try to join it when there is free space around you, before pasting it back into the corresponding highlighted list? Or do you just insert a 4-word block into the "4 words" section of the corresponding split linked list?

Thank.

+5
source share
1 answer

, ? , -. , , . , - , "", .

. :

  • .
  • .
  • .
  • .

:

  • , , , , .

, , alloc() , , .

+4

All Articles