Memory Allocation, Default memory allocation strategy on Linux?

I lately learned about memory allocations and use of malloc. The malloc command is defined in the POSIX standard, as can be seen hereIt says

The order and contiguity of storage allocated by successive calls to malloc() is unspecified.

So what is the default allocation strategy malloc uses on Linux. Is that allocation strategy different then from windows/ macOS or Android?

I heard malloc on Linux uses the Buddy memory allocation strategy is that true, since on wiki it only says the Linux Kernel uses it, but not Linux itself, idk?

GodHimself,

Not to be “that guy” but just FYI Linux IS the kernel. Everything else you use on top of it (the shell, commands, UI, etc) are just GNU (For shell stuff) and packages.

That’s why you may see Linux referred to as “GNU/Linux” aka the Linux kernel with all the standard GNU tools included.

As for Mallorca, I dunno

fiasco,
@fiasco@possumpat.io avatar

Userland malloc comes from libc, which is most likely glibc. Maybe this will tell you what you wanna know: sourceware.org/glibc/wiki/MallocInternals

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • [email protected]
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • oklahoma
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • SuperSentai
  • feritale
  • KamenRider
  • All magazines