| Crates.io | aren_alloc |
| lib.rs | aren_alloc |
| version | 0.3.0 |
| created_at | 2017-05-12 14:06:02.595735+00 |
| updated_at | 2018-02-22 13:13:17.113655+00 |
| description | Simple allocator for small copyable objects inspired by object-pools. |
| homepage | https://github.com/DaseinPhaos/aren_alloc |
| repository | https://github.com/DaseinPhaos/aren_alloc |
| max_upload_size | |
| id | 14299 |
| size | 28,134 |
A thread-local memory allocator backed up by the concept of object pools,
used to address the memory allocation needs of arendur.
This crate is useful when
use aren_alloc::Allocator;
#[derive(Copy, Clone)]
struct Point(u32, u32);
let allocator = Allocator::new();
let p = allocator.alloc(Point(1, 2));
assert_eq!(p.0, 1);
assert_eq!(p.1, 2);
As CoerceUnsized is supported for Pointer, compiling would require a nightly version.
This project is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE, LICENSE-MIT for details.