mmap and sbrk would be very poor implementations of malloc.
Re:The Journey Before main()
by 1718627440 on Sunday October 26, 2025 @10:28AM
(#45712184)
We are talking of wrappers on top of mmap and sbrk. Of course you wouldn't use mmap and sbrk instead of the abstraction. It's really the same as the difference between fread and read.
> C is used a lot in embedded projects.
Sure that's a freestanding implementation, which primary distinction is that it doesn't rely on the libc. The notion of the libc being part of the OS in the wider sense, still holds water here, since here no OS corresponds to no libc.