From 2dd268b652cb42f4ebaa145c9e50cc6509c47d26 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 20 Nov 2017 15:42:34 +0100 Subject: alloc_jemalloc: don’t assume MIN_ALIGN for small sizes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/liballoc/tests/heap.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/liballoc/tests') 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(mut allocator: T) { let size = 8; let align = 16; // greater than size -- cgit 1.4.1-3-g733a5