initial port of the exchange allocator to jemalloc
In stage0, all allocations are 8-byte aligned. Passing a size and alignment to free is not yet implemented everywhere (0 size and 8 align are used as placeholders). Fixing this is part of #13994. Closes #13616
This commit is contained in:
@@ -1512,7 +1512,7 @@ impl<T> FromVec<T> for ~[T] {
|
||||
let vp = v.as_mut_ptr();
|
||||
|
||||
unsafe {
|
||||
let ret = malloc_raw(size) as *mut RawVec<()>;
|
||||
let ret = allocate(size, 8) as *mut RawVec<()>;
|
||||
|
||||
(*ret).fill = len * mem::nonzero_size_of::<T>();
|
||||
(*ret).alloc = len * mem::nonzero_size_of::<T>();
|
||||
|
||||
Reference in New Issue
Block a user