Hacker GitHub

← All repos

scotts/streamflow

View on GitHub ↗ ★ 111 C

Lock-free multithreaded memory allocation

12 mentions on Hacker News by 1 person: 0 stories, 12 comments · first 2010-07-13 · latest 2024-05-02

Mentions per year 12 mentions · busiest year 2011 (3)
20082026
  1. This function is O(1): https://github.com/scotts/streamflow/blob/master/streamflow.... . All other tree operations are also constant, because the fact that it is a 3-level tree is hardcoded. Asymptotic bounds are useful when your input can…
  2. …to only be 3 levels deep. See my implementation, which (I believe) I borrowed from tcmalloc: https://github.com/scotts/streamflow/blob/master/streamflow....
  3. …Locality-Conscious Multithreaded Memory Allocation, https://www.scott-a-s.com/files/ismm06.pdf [2] https://github.com/scotts/streamflow/
    comment by scott_s · 2020-12-01 · in ARM and Lock-Free Programming
  4. …memory allocator I worked on in grad school ( http://www.scott-a-s.com/files/ismm06.pdf; https://github.com/scotts/streamflow/ ).
    comment by scott_s · 2018-06-28 · in State of Multicore OCaml [pdf]
  5. …mine shows all three techniques (headers, radix tree, giant array, also called a BIg Bag Of Pages): https://github.com/scotts/streamflow/blob/master/streamflow.... Something else the author did not mention is that when it comes to…
    comment by scott_s · 2016-04-04 · in Malloc envy
  6. …see if you should clean your memory that other threads freed for you. You can see this in action: https://github.com/scotts/streamflow/blob/master/streamflow.... All of the above is just to add some background - I look forward to really…
  7. …when I knew the context in which it was used would only require handling powers-of-2 up to 16384: https://github.com/scotts/streamflow/blob/master/streamflow....
  8. …of the page itself to hold its own data structure. You can see an example of this technique here: https://github.com/scotts/streamflow/blob/master/streamflow.... This bit of code executes when a call to malloc() could not find any free…
  9. …borrowed from TCMalloc), and you can see multiple compare-and-swap operations in the main routine ( https://github.com/scotts/streamflow/blob/master/streamflow.... ), but they will be hit only rarely. I applied your reasoning, though. The…
  10. …with more algorithmic details. I can clean it up and send it to interested parties. Source code: http://github.com/scotts/streamflow/ There's also an excellent paper recently published at PACT 2011 that is extends and improves on what we…
  11. …linker sees your function before the library function. For example, here I override pthread_create: https://github.com/scotts/streamflow/blob/master/override.c#... Note that I also figure out, at runtime, how to call the real version of…
    comment by scott_s · 2011-05-15 · in Machine code monkey patching
  12. …kernel maintains just about everything. It's also how I've implemented lists inside of an allocator: http://github.com/scotts/streamflow/blob/master/streamflow.h...
    comment by scott_s · 2010-07-13 · in It’s Faster Because It’s C