Skip to content

Repository files navigation

byte-pool

A flexible byte pool.

Crates.io versionDownloaddocs.rs docsCI status

Example

use byte_pool::BytePool;// Create a poollet pool = BytePool::<Vec<u8>>::new();// Allocate a bufferletmut buf = pool.alloc(1024);// write some data into itfor i in0..100{
buf[i] = 12;}// Check that we actually wrote sth.assert_eq!(buf[55],12);// Returns the underlying memory to the pool.drop(buf);// Frees all memory in the pool.drop(pool);

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A flexible byte pool.

Resources

Stars

19 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages