| Crates.io | bitcoin-arena |
| lib.rs | bitcoin-arena |
| version | 0.1.2 |
| created_at | 2025-07-09 01:34:47.610107+00 |
| updated_at | 2025-07-09 08:32:24.201034+00 |
| description | Efficient arena-based memory management crate for high-performance Rust applications, facilitating customized memory allocations. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1743869 |
| size | 94,832 |
bitcoin-arena is a custom memory allocation crate in Rust mimicking manual memory management with arena-based allocations. The primary goal of this crate is to enhance high-performance applications where control over memory layout is crucial. It provides a mechanism to efficiently allocate and deallocate memory chunks.
BTreeMap and HashMap to keep track of free and used memory blocks. ArenaStats struct.An Arena is initialized with a base pointer, size, and alignment requirement. It supports:
used, free, total, etc.).let mut arena = Arena::new(base_ptr, arena_size, alignment);
let ptr = arena.alloc(256);
arena.free(ptr);
let stats = arena.stats();
The crate uses raw pointers, necessitating caution to ensure memory safety. Proper handling of the lifetime of the memory arena is necessary.
bitcoin-arena is licensed under the MIT License. Contributions are welcome.
This README.md file was generated by an AI model and may not be 100% accurate, although it should be pretty good.