Auto merge of #45514 - gnzlbg:jemalloc_realloc2, r=sfackler
[jemalloc] set correct excess in realloc_excess
This commit is contained in:
commit
a4541525d5
@ -203,7 +203,8 @@ mod contents {
|
|||||||
err: *mut u8) -> *mut u8 {
|
err: *mut u8) -> *mut u8 {
|
||||||
let p = __rde_alloc(size, align, err);
|
let p = __rde_alloc(size, align, err);
|
||||||
if !p.is_null() {
|
if !p.is_null() {
|
||||||
*excess = size;
|
let flags = align_to_flags(align);
|
||||||
|
*excess = nallocx(size, flags) as usize;
|
||||||
}
|
}
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
@ -219,9 +220,10 @@ mod contents {
|
|||||||
err: *mut u8) -> *mut u8 {
|
err: *mut u8) -> *mut u8 {
|
||||||
let p = __rde_realloc(ptr, old_size, old_align, new_size, new_align, err);
|
let p = __rde_realloc(ptr, old_size, old_align, new_size, new_align, err);
|
||||||
if !p.is_null() {
|
if !p.is_null() {
|
||||||
*excess = new_size;
|
let flags = align_to_flags(new_align);
|
||||||
|
*excess = nallocx(new_size, flags) as usize;
|
||||||
}
|
}
|
||||||
return p
|
p
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
Loading…
Reference in New Issue
Block a user