Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7744181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:42:27+00:00 2026-06-01T09:42:27+00:00

Yes, I am taking a Computer systems course. I had a few questions about

  • 0

Yes, I am taking a Computer systems course.
I had a few questions about the various allocation schemes to implement malloc.
For explicit lists, if I implement malloc using a LIFO-like stack, what exactly is the purpose of having pointers to previous freed memory? Like why do you need doubly-linked lists? Wouldn’t singly linked lists work just as well?

Malloc lecture.
I found this link online, you can look at slide 7 to see what I’m talking about.

When looking at a segregated list allocation scheme, these lists are uni-directional right? And also, what exactly is the coalescing mechanism? Like for example, if 4 words are freed, would you first try and join it when the free space around you before inserting it back into the respective segregated linked list? Or would you simply insert the 4 word block in the ‘4 word’ section of the respective segregated linked list?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:42:28+00:00Added an answer on June 1, 2026 at 9:42 am

    Since a freed block always has room for two pointers, why not doubly-link the list? It simplifies the coalescing code so it doesn’t have to maintain a trailing pointer while traversing the list. It also allows traversing the list in either direction in case there is a hint for which end of the list might be closer to begin the search. One obscure system I once looked at kept a pointer in the “middle”, where the last activity occurred.

    When freeing a block. There are only four possible cases:

    • The free block is adjacent after a free block.
    • The free block is adjacent before a free block.
    • The free block is between and adjacent to both free blocks before and after it.
    • The free block is not adjacent to any free block.

    The purposes of coalescing adjacent free blocks are:

    • to reduce the length of the linked list
    • to accurately reflect the size of a free block without burdening the allocator to look ahead to see if two blocks are adjacent

    Sorting a free block into a specific-length freelist often has benefits, but in most practical implementations, coalescing is a priority so that an alloc() request for a different size block isn’t inappropriately denied when there are many differently-sized free blocks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yes we're talking about ASCII codes. My appologies I'm not the Delphi dev here.
Yes, I am talking about Java 1.3 - I'm maintaining an application that for
I have a camera that is taking pictures one by one (about 10 pictures
Yes, I know. The existence of a running copy of SQL Server 6.5 in
...Yes I've seen: Best Resources for Learning JavaFX? but it doesn't really answer the
Yes, There's More Than One Way To Do It but there must be a
Yes, there is a similar question here . However, that question doesn't seem to
Yes, I know you could use regular objects as associative arrays in JavaScript, but
Yes, I do understand the difference between them. What I want to know is:
Yes, another NULL vs empty string question. I agree with the idea that NULL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.