3 ms·
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
by tasn 4y 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.
- astrange 4y agoWell, it's good as a drop in solution but an arena allocator or malloc zones would really be best.