Hacker News new | ask | show | jobs
by tasn 1166 days ago
Not in the context of an HTTP server. As we just parse, use it in the request, and then return (freeing all the memory). I think the problem is because we have multiple requests being handled in tandem and Rust doesn't know it's probably better off allocating all of the data together and then freeing this big block.

That's what's nice about jemalloc, it has a more generic algorithm for reusing allocated blocks.

1 comments

Well, it's good as a drop in solution but an arena allocator or malloc zones would really be best.