logoalt Hacker News

m463today at 8:01 PM2 repliesview on HN

I remember in the early days of web services, using the apache portable runtime, specifically memory pools.

If you got a web request, you could allocate a memory pool for it, then you would do all your memory allocations from that pool. And when your web request ended - either cleanly or with a hundred different kinds of errors, you could just free the entire pool.

it was nice and made an impression on me.

I think the lowly malloc probably has lots of interesting ways of growing and changing.


Replies

Sesse__today at 9:44 PM

This is called “an arena” more generally, and it is in wide use across many forms of servers, compilers, and others.

jra_sambatoday at 8:42 PM

Look into talloc, used inside Samba (and other FLOSS projects like sssd). Exactly this.