News for hackers. Stuff that matters.
Re:Writing a simple pool allocator in C by JJOmeo on Wednesday January 08, 2025 @11:58PM (#42641761)
Pool allocators don't walk the list or search anything though. All interactions are only at the list head and O(1), as all free nodes are just that, free and equal.
Re:Writing a simple pool allocator in C by ceving on Thursday January 09, 2025 @03:28AM (#42643084)
Then it might be a misnomber. Calling it "stack" instead of "list" might be better.
Re:Writing a simple pool allocator in C by alextingle on Thursday January 09, 2025 @04:01AM (#42643298)
That is a fair comment.
Re:Writing a simple pool allocator in C by cb321 on Thursday January 09, 2025 @08:01AM (#42644900)
While the most precise naming might be "a singly linked list representation of a stack", "free list" (https://en.wikipedia.org/wiki/Free_list) is an ancient term of art for this problem.. so much so that wikipedia (at least the version today) even suggests "freelist" all one word as a spelling.