[haiku-bugs] Re: [Haiku] #13554: Switch system allocator

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Mon, 11 May 2020 17:06:48 -0000

#13554: Switch system allocator
--------------------------------+----------------------------
  Reporter:  waddlesplash       |      Owner:  waddlesplash
      Type:  enhancement        |     Status:  assigned
  Priority:  high               |  Milestone:  Unscheduled
 Component:  System/libroot.so  |    Version:  R1/Development
Resolution:                     |   Keywords:
Blocked By:                     |   Blocking:  15996
  Platform:  All                |
--------------------------------+----------------------------
Comment (by pulkomandy):

 We need to do benchmarks, and see what works for us. musl is designed with
 Linux apps in mind, a lot of apps are running single threaded there, where
 we have a minimum of 2 threads and usually a lot more. So "system
 allocator" isn't all there is to it. We also have a lot of producer-
 consumer type of interactions between the threads because of BMessages
 (allocated in the sender thread, freed in the receiver thread), which
 mimalloc does handle reasonably. And because we are mainly C++, there can
 also be different patterns of allications than what musl would optimize
 for.

 We need to experiment, benchmark, see what works and what doesn't. So yes,
 musl is a good candidate, but so are mimalloc and jemalloc. We need to
 compare them in real-world and see how they behave. Then we can decide
 which one we want to use. We may even end up making different choices for
 the 32 and 64bit versions of Haiku, if we find that the
 performance/overhead compromise is indeed very different between the two.

 And of course we need to configure the allocator to match our use case,
 when there are things available to configure.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/13554#comment:25>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: