by onlydnaq · 4y ago · 0 comments
Still pretty impressive project. Would be fun to take a deeper look at it at some point.
This is what PHK did when designing Varnish (IIRC): instead of dealing with lots of files on its own (like Squid), just create some files and do a malloc() on them and let the OS do the work:
* https://varnish-cache.org/docs/trunk/phk/notes.html
One discussion (many others):
It's a beautifully powerful function :)
(Some allocators, like glibc may also use brk, but it's possible to write a fully functional allocator with only mmap).