polymock
A thread-safe bump allocation arena for bytes.
polymock is primarly targeted at high-throughput multi-threaded network applications which
need to allocate and free buffers very frequently and cannot afford going through the global
allocator.
Usage
Add polymock to your Cargo.toml:
= "0.2.0"
Next create an allocation arena and allocate some buffers:
use Arena;
// Create a bump arena with a chunk size of 1000 bytes.
let arena = new;
let mut buffers = Vecnew;
for _ in 0..10
// The allocated buffers may outlive the arena they
// were allocated with.
drop;
buffers = 1;
License
Licensed under either MIT License or Apache License, Version 2.0 at your option.