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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user