What's a good, simple malloc algorithm if size always = 1?
-
-
Replying to @wycats
As long a 1 >= width of a ptr: Single linked list where each free slot contains next ptr. add/remove from start of chain to free/alloc.
1 reply 0 retweets 1 like -
Replying to @okito
Yeah I was thinking something like that. Doubly linked list and rewire prev/next free when freeing?
1 reply 0 retweets 0 likes -
Replying to @wycats
Do you need double? You’re only just adding/removing to end of chain when you free/alloc.
1 reply 0 retweets 0 likes -
Ah no. You point the end to the new thing! Of course!
2:41 PM - 26 Oct 2017
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.