
Fast Memory Pool Allocators: Boost, Nginx and Tempesta FW - krizhanovsky
http://natsys-lab.blogspot.com/2015/09/fast-memory-pool-allocators-boost-nginx.html
======
pquerna
Another interesting implementation that is written by an apache http server,
APR, and subversion developer is pocore:

[https://github.com/gstein/pocore/blob/master/src/memory.c](https://github.com/gstein/pocore/blob/master/src/memory.c)
[https://github.com/gstein/pocore/blob/wiki/MemoryManagement....](https://github.com/gstein/pocore/blob/wiki/MemoryManagement.md)

It's design is heavily influenced by real world experiences -- as this post
even changed its benchmarks to reflect that in an HTTP server, a request uses
maybe 100 small chunks per request, you can make different optimization
choices.

------
rwmj
Pools are great. They work really well with servers of all kinds. Even better
are pool allocators that support subpools, and adding arbitrary objects that
can be closed/deleted with the pool (like files). Eons ago I wrote a nice
little C pool allocator:
[http://git.annexia.org/?p=c2lib.git;a=blob;f=pool.h;h=f8ed4c...](http://git.annexia.org/?p=c2lib.git;a=blob;f=pool.h;h=f8ed4c463d3ca29f55aef1aa6e484b0a1b21e12c;hb=HEAD)

------
ck2
Somewhat related I tried to compile nginx with --with-ld-opt="-ljemalloc" to
make it use jemalloc for more performance and it did not really like that,
threw segfaults at random during runtime. Don't understand enough to know why.

