| ▲ | Doug Lea's Malloc(gee.cs.oswego.edu) |
| 24 points by grep_it 3 days ago | 10 comments |
| |
|
| ▲ | senderista 2 hours ago | parent | next [-] |
| It was a good single-threaded allocator back in the day but in the multicore era the design is now thoroughly obsolete. I suggest reading e.g. the jemalloc[1] and mimalloc[2] papers if you want to understand how modern allocators are implemented. [1] https://people.freebsd.org/~jasone/jemalloc/bsdcan2006/jemal... [2] https://www.microsoft.com/en-us/research/wp-content/uploads/... |
| |
| ▲ | HexDecOctBin an hour ago | parent | next [-] | | Considering that global allocators are usually an anti-pattern and that most applications should have component-specific allocators, dlmalloc isn't all that bad when used through its mspace API. Of course, if one doesn't actually need a general allocator, they should simply use an arena allocator. | | |
| ▲ | Conscat 9 minutes ago | parent [-] | | Musl still supports single threaded slab allocations. In Musl, the difference comes down to one lock, some atomics, and a #define. My library extracts out its algorithm and let's you use scoped single and multi threaded Musl allocators freely mixed with each other. |
| |
| ▲ | brcmthrowaway 42 minutes ago | parent | prev [-] | | Has anyone tried jev as an allocator? | | |
|
|
| ▲ | asveikau 2 hours ago | parent | prev | next [-] |
| In the mid 2000s I was a student in upstate NY and I very briefly met Doug Lea. (I'm 100% sure he doesn't remember me at all.) He was a very warm, approachable, down to earth guy. The computer labs at Oswego had a bunch of giant Sun Microsystems logos on all the gear, I guess because they were funding him. |
|
| ▲ | acyclic 3 days ago | parent | prev | next [-] |
| The only algorithm to be named after someone's full name, first and last name |
|
| ▲ | tripdout 2 hours ago | parent | prev [-] |
| I believe this was the original malloc used in Android's bionic libc. |
| |
| ▲ | egberts1 an hour ago | parent [-] | | False. Android up to v4.1 bionic is based on Doug Lea's dlmalloc v2.8.3 Android v4.2 upgraded to dlmalloc v2.8.6 Android v5.0 transitioned to jemalloc. Modern Android is based on jemalloc or Scudo, based on build configuration. Android never used original dlmalloc. | | |
| ▲ | Conscat 5 minutes ago | parent [-] | | Am I confused or did you agree with your parent comment that dlmalloc was the original algorithm used by Android? |
|
|