Hacker News new | ask | show | jobs
by umanwizard 2447 days ago
How do other malloc implementations avoid this? It seems natural if what “free” does involves adding the pointer to some free list. Obviously you wouldn’t want to scan the whole free list every time looking for duplicates - is there another way to avoid this behavior?
1 comments

Bitmaps don't require scanning.
They do, you'd just scanning a smaller thing.
What are you scanning the bitmap looking for? Why not just index into it and look at the relevant bit?