diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2017-11-20 15:42:34 +0100 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2017-11-20 16:22:17 +0100 |
| commit | 2dd268b652cb42f4ebaa145c9e50cc6509c47d26 (patch) | |
| tree | b717ecc7302b1453a6f649d15fef33216be78411 /src/liballoc/tests | |
| parent | 21d899272a7fb39a497424e3260ddab773af7983 (diff) | |
| download | rust-2dd268b652cb42f4ebaa145c9e50cc6509c47d26.tar.gz rust-2dd268b652cb42f4ebaa145c9e50cc6509c47d26.zip | |
alloc_jemalloc: don’t assume MIN_ALIGN for small sizes
See previous commit’s message for what is expected of allocators in general, and https://github.com/jemalloc/jemalloc/issues/1072 for discussion of what jemalloc does specifically.
Diffstat (limited to 'src/liballoc/tests')
| -rw-r--r-- | src/liballoc/tests/heap.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/liballoc/tests/heap.rs b/src/liballoc/tests/heap.rs index 9423aabc82b..d3ce12056bb 100644 --- a/src/liballoc/tests/heap.rs +++ b/src/liballoc/tests/heap.rs @@ -20,6 +20,11 @@ fn alloc_system_overaligned_request() { check_overalign_requests(System) } +#[test] +fn std_heap_overaligned_request() { + check_overalign_requests(Heap) +} + fn check_overalign_requests<T: Alloc>(mut allocator: T) { let size = 8; let align = 16; // greater than size |
